I need to format a file where records are separated by only Linefeed (0a). I tryed several solutions which doesn't
works.
1) echo "a" | awk 'BEGIN{ORS="\x0a" } {print "xxx";print"yyy"}' > toto
Result: 78 78 78 0d 0a 79 79 79 0d 0a => Carriage return (0d) is unexpected
2 ) echo "a" | awk '{printf("xxx\x0ayyy"'} > toto
Result: 78 78 78 0d 0a 79 79 79 => Carriage return (0d) is unexpected
How to get a result as 78 78 78 0a 79 79 79 ?
works.
1) echo "a" | awk 'BEGIN{ORS="\x0a" } {print "xxx";print"yyy"}' > toto
Result: 78 78 78 0d 0a 79 79 79 0d 0a => Carriage return (0d) is unexpected
2 ) echo "a" | awk '{printf("xxx\x0ayyy"'} > toto
Result: 78 78 78 0d 0a 79 79 79 => Carriage return (0d) is unexpected
How to get a result as 78 78 78 0a 79 79 79 ?