Thread
:
dos to unix linefeeds
View Single Post
#
7
(View Single Post)
18th May 2008
protologic
New User
Join Date: May 2008
Posts: 5
Here are one-liner functions I keep in my .shrc so I don't need to install dos2unix on each new machine:
dos2unix() { awk "{ sub(\"\r\$\", \"\"); print }" $1 > $2; }
unix2dos() { awk "sub(\"\$\", \"\r\")" $1 > $2; }
protologic
View Public Profile
Find all posts by protologic