" Pharos blueprint cleanup" is this a virus? what kind of software is this?
Monday, July 28, 2008
Thursday, July 19, 2007
dos2unix utility
Have you noticed the strange looking control characters at the end of the line when you transfer a file from Windows to unix or linux. If this file is a script the unix shells or PERL will refuse to use to run this script since they don't understand these control characters at the end. Isn't that a pain to delele all those control characters manually from the end of the line?
Here is a utility in unix or linux that can convert these DOS or windows files into unix or linux readable format. The utility is called "dos2unix". The dos2unix utility converts characters in the DOS extended character set to the corresponding ISO standard characters. Here is the header of "man page" for dos2unix:
NAME dos2unix - convert text file from DOS format to ISO format
SYNOPSIS dos2unix [ -ascii ] [ -iso ] [ -7 ] original file converted file
OPTIONS
-ascii Removes extra carriage returns and converts end of file characters in DOS format text files to conform to SunOS requirements.
-iso This is the default. It converts characters in the DOS extended character set to the corresponding ISO standard characters.
-7 Convert 8 bit DOS graphics characters to 7 bit space characters so that SunOS can read the file.
Similarly, you have unix2dos utility to convert text file from ISO format to DOS format. Checkout the man pages for these and you might save sometime on these tasks.
-Nidhi
Posted by Nidhi at 10:33 AM 1 comments