Showing posts with label file manipulation. Show all posts
Showing posts with label file manipulation. Show all posts

Tuesday, March 16, 2010

TR (bash)

Can use tr to remove all carriage returns and Ctrl-z ( ^Z ) characters from a Windows file by entering:

tr -d '\15\32' < winfile.txt > unixfile.txt

tr '\r' '\n' < web_to_print_compare-edited.csv > unixfile.csv


Note: cannot use tr to convert a document from Unix format to Windows