d2u Command

File Converter

d2u Command

Syntax

d2u [-bBuUlLfF] [[<]input_file] [[>]output_file]

Description

Lines in DOS text files are terminated by a carriage-return/line-feed pair, while lines in UNIX text files are terminated by a single line feed. The d2u command lets you convert text files from DOS format to UNIX format.

The input_file and output_file arguments may optionally have a redirection symbol in front of them. The d2u command reads from standard input and writes to standard output, if there are no file arguments specified. The input_file specification is the file that is to be converted. The output_file specification is the name of the file that is to receive the converted file.

The size of the output_file can be smaller than the input_file, since each two-character sequence (<CR><LF>) of the input file is replaced by 1 character (<LF>) in the output file.

Options

-b|-B

Binary—Allows for preservation of 8-bit character codes in the output file. If this option is not specified, then all 8-bit codes are converted to 7-bit codes.

-u|-U

Uppercase—Converts all alphabetic characters in the input file to upper case in the output file.

-l|-L

Lowercase—Converts all alphabetic characters in the input file to lower case in the output file.

-f|-F
      

Fudge—Causes d2u to leave any carriage-return characters in the input file alone. Usually carriage-return characters are removed in the conversion and carriage-return/line-feed pairs are changed into line-feed characters. This option preserves carriage-return characters in the output file.

Example

d2u options salesinput salesoutput

Related Topics

Introducing File Converter

u2d Command