awk
awk '{ sub("\r$", ""); print }' windows.txt > unix.txt
awk 'sub("$", "\r")' uniz.txt > windows.txt
Convert DOS to UNIX and vice versa
The awk command
awk
command also lets you convert a file from UNIX to Windows and vice versa. To convert a Windows file to a UNIX file, enter the following command:Archives
Categories
Recent Posts
Stopping and Removing Containers
29 May 2019Installing Amazon CLI and Terraform on Windows desktop
27 May 2019Convert DOS to UNIX and vice versa
25 May 2019Calendar