Dear all,
I face a problem I can not solve: I have different lines in a file and some of them are ending with [CR][LF] ie "\r\n" and the others are ending with [LF] "\n".
My aim is to supress the string "\r\n" and concatenate that line with the following one.
For example:
Saying I have a file 4_test.csv with the 4 following lines:
[x004191a@xsnl11p370p tmp]$ cat -v 4_test.csv
123^M
456
789^M
0AB
[x004191a@xsnl11p370p tmp]$ od -c 4_test.csv
0000000 1 2 3 \r \n 4 5 6 \n 7 8 9 \r \n 0 A
0000020 B \n
0000022
[x004191a@xsnl11p370p tmp]$
My aim is to get as a result a file with only the two following lines:
[x004191a@xsnl11p370p tmp]$ cat -v 4_test_target.csv
123456
7890AB
[x004191a@xsnl11p370p tmp]$ od -c 4_test_target.csv
0000000 1 2 3 4 5 6 \n 7 8 9 0 A B \n
0000016
[x004191a@xsnl11p370p tmp]$
I tried different syntax using sed but I was not able to suppress the two consecutive characters '\r\n' !
Any kind of idea would be greatly appreciated ... Thanks a lot,
Didier.