I had a strange error recently to do with a bash script not running correctly. I couldn't see anything wrong with the file until I noticed that VIM was reporting that the file's type was DOS.
What I needed was to convert the downloaded file to UNIX file format using dos2unix but which package does it live in? A quick search of the Ubuntu packages database revealed tofrodos:
Converts DOS <-> Unix text files, alias tofromdosTo install it run:
DOS text files traditionally have CR/LF (carriage return/line feed) pairs as their new line delimiters while Unix text files traditionally have LFs (line feeds) to terminate each line.
Tofrodos comprises one program, "fromdos" alias "todos", which converts text files to and from these formats. Use "fromdos" to convert DOS text files to the Unix format, and "todos" to convert Unix text files to the DOS format.
This functionality is also available via the dos2unix/unix2dos symlinks.
sudo aptitude install tofrodosAnd then use dos2unix and unix2dos to convert the file between the two different formats.
Technorati Tags: dos2unix, Ubuntu, Package, Andrew Beacock