mac,windows,linux newline processing

If you are dealing with unix files on windows, use the following command:

D:\>TYPE unix_file | FIND /V "" > dos_file

 If you get the windows file from the unix file, use the following command:

tr -d '\r' < inputfile > outputfile

 or

tr '\r' '\n' < inputfile > outputfile

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326486213&siteId=291194637