Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
1 5
Impact
~5k people reached

  • 0 posts edited
  • 0 helpful flags
  • 6 votes cast
Jan
27
comment How can I add new character after each line?
The 2. solved my problem
Jan
27
comment How can I add new character after each line?
I can reproduce with the followings:printf '%s\r\n%s\r\n' foo bar | awk '{print $0"A"}' >test. How can I overcome of this?
Jan
27
comment How can I add new character after each line?
@Marco In the following way I can reproduce it printf '%s\r\n%s\r\n' foo bar | awk '{print $0"A"}' >test
Jan
27
comment How can I add new character after each line?
This gives the same result, the A is in a new line
Jan
27
comment How can I add new character after each line?
That returns the expected the output fooA barA
Sep
10
comment How can I reformat a time string in multiple files?
This solves the problem. Thanks.
Sep
10
comment How can I reformat a time string in multiple files?
I tried your solution sed -i 's#([0-9]{2})\.([0-9]{2})\.([0-9]{4})#\3-\2-\1#' *.txt but I am getting the following error: sed: -e expression #1, char 46: invalid reference \3 on `s' command's RHS
Jan
5
comment How can I replace string in a file?
perl is way faster, tested for large files >1GB