View Single Post
  #7   (View Single Post)  
Old 18th May 2008
protologic protologic is offline
New User
 
Join Date: May 2008
Posts: 5
Default

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; }
Reply With Quote