Friday, December 4, 2009

Remove the CR character with sed or tr

Following command will redirect the content of dosfile except the CR characters to newfile:

sed 's/^V^M//' dosfile > newfile

Note: ^ is the control key.

tr -d '\015' < dosfile > newfile

No comments: