LINE STRIPPING Dos -> Unix


From: Tom Marinis <tmarinis@intouch.bc.ca>

MS DOS text files use CR/LF characters in text files to denote end of each line.

Unix uses LF only to denote the same thing.

To convert a DOS inspired text file into Unix create the following executable script


1) edit dos2unix

tr -d '\015' < $1 > $2

2. Make it executable:

chmod +x dos2unix

3. run is as follows:

dos2unix /dir/to/dos_file newfile_name

--------

Mike's addenda

there is a very good (tm) unix editor for Windoze (http://www.winedit.com). Thoroughly reccomended.

searchSearch Index