Etc - Converting Windows Text files to Unix


2003-02-14
Windows adds an extra carriage return to Unix files.To convert use one of these methods:

tr -d '1532' < winfile.txt > unixfile.txt

awk '{ sub("r$", ""); print }' winfile.txt > unixfile.txt

awk 'sub("$", "r")' unixfile.txt > winfile.txt

col -bx < winfile > unixfile