Oct 9, 2012

How to convert Mac line endings to Unix

Just a small note because a bunch of parsing scripts stopped working.

To convert MAC CR line endings to UNIX LF:

cat mac.txt | tr "\r" "\n" > unix.txt

We use the translate tr command to replace \r to \n.

No comments:

Post a Comment

Real Time Web Analytics