
Need To Insert Carriage Return
From the keyboard of fmd3201@marst2 (Larry Baca):
:I need to insert a carriage return (hex 0d) before the newline (hex 0a)
:of every record in a file of 80 col records.
:
:I have looked at sed and awk but so far no luck, maybe someone out there
:has the answer. Thanks....
sed -e 's/$/^M/'
should suffice, but your shell may not let you pass in the ^M directly,
you you'd have to put it in a file.
perl -pe 's/$/\r/'
would also work, and wouldn't have that trouble.
--tom