RongTsai4Git / TechNote

0 stars 0 forks source link

Linux Command Usage #10

Open RongTsai4Git opened 2 years ago

RongTsai4Git commented 2 years ago

Convert between Unix and Windows text files

 tr -d '\15\32' < winfile.txt > unixfile.txt
RongTsai4Git commented 2 years ago

Using Vim to convert doc format

# convert to Unix
:set ff=unix 

# convert to Windows.
:set ff=dos 
RongTsai4Git commented 2 years ago

recursively find all files inside current directory and call for these files dos2unix command

find . -type f -print0 | xargs -0 dos2unix