Useful debian package #1

As I’m sure I’ll come across many useful packages in debian that are useful, here is the first small but handy tool:

Package: tofrodos
Description: Converts DOS <-> Unix text files, alias tofromdos

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.


Note: I’m aware that a simple regex such as s/\r// should convert to dos, but I tried using sed for that and it didn’t work. Enlighten me if you know why.


#1   andrew brown on 05.22.06 at 8:43 pm

that reminds me of converting between dos and MY AMIGA

#2   Bob on 05.23.06 at 3:04 pm

Regex and simple in one sentence. Bit of an ocymoron that 🙂

#3   Joel on 05.23.06 at 4:39 pm

Regex are simple! ;P

Leave a Comment