to_dos(1)

to_dos, to_unix - convert text files between MSDOS and UNIX

As shipped in IRIX 6.5.15. Unchanged since IRIX 6.5.

NAME
     to_dos, to_unix - convert text files between MSDOS and UNIX

SYNOPSIS
     to_dos [ <UNIX file> [<MSDOS file>]]
     to_unix [ <MSDOS file> [<UNIX file>]]

DESCRIPTION
     to_dos converts a UNIX text file into a MSDOS text file by appending a
     control-M character at the end of each line and a control-Z character at
     the end of the file.  to_unix converts a MSDOS text file into a UNIX text
     file by stripping trailing control-M and control-Z characters.

     Both commands can take zero, one, or two arguments.  If no arguments are
     given, the commands act as a filter, taking input from stdin and writing
     the modified file to stdout.  When a single argument is specified, the
     argument is treated as the name of the input file, and the resulting
     output is written to stdout.  Finally, if two arguments are provided on
     the command line, the first argument is treated as the input file and the
     second argument is treated as the output file.

EXAMPLES
     cat /etc/hosts | to_dos > /dev/ttyd2

     to_unix /etc/hosts > /dev/ttyd2

     to_dos /etc/hosts /dev/ttyd2

BUGS
     Both to_dos and to_unix are unable to deal with extremely long lines (>
     4K).