Skip to content

Convert Files from Linux/Unix Format to Windows and Vice Versa

cpx April 6, 2014 1 min read shell

With AWK:



awk '{ sub("\r$", ""); print }' windows.txt > unix.txt awk 'sub("$", "\r")' unix.txt > windows.txt

With TR

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

 

:1,$s/^M//g

 

Be the first to comment

protected · no tracking

0 comments