 |
Index for Section 1 |
|
 |
Alphabetical listing for U |
|
 |
Bottom of page |
|
ud(1)
NAME
ud - Converts text files between UNIX, DOS, and Macintosh formats
SYNOPSIS
/usr/bin/ud [{-d | -u | -m } -z] [file]
OPTIONS
file
The name of the input file to be converted. If no options are
specified, ud attempts to determine whether this file is a DOS or a
UNIX format file, and converts accordingly. If no input file is
specified, ud takes its input from standard input.
-d Converts the input file to DOS format, replacing newline characters
with a combination of carriage return and line feeds.
-u Converts the input file to UNIX format.
-m Converts the input file to Macintosh format.
-z Causes ud to ignore or not emit the Ctrl/Z character found at the end
of most DOS files.
DESCRIPTION
The ud program converts a DOS file to UNIX system format or a UNIX system
file to DOS format, and sends the result to standard output. Without any
options, ud determines the format of the input file, and converts it from
DOS to UNIX or from UNIX to DOS accordingly.
Text files created in DOS usually use a combination carriage return and
line feed to mark the end of each line of text, while UNIX text lines are
terminated with a single newline character. In addition, DOS files often
end with a Ctrl/Z character, while UNIX files do not.
The ud command can also be used to convert text files to and from the
Macintosh file format.
Like many similar UNIX commands, the output can be redirected to a second
file with the redirection operator ( > ) or to a second program with a pipe
( | ).
EXAMPLES
1. To convert a UNIX file called text.unx to DOS format, and place the
output in a file called text.dos, enter:
ud -d text.unx >text.dos
2. To convert a UNIX system file calledunixtext to OS/2 format, then sort
the file and place the output in a file called text.srt, enter:
ud -d unixtext | sort>text.srt
SEE ALSO
Commands: unix2dos(1as), dos2unix(1as)
 |
Index for Section 1 |
|
 |
Alphabetical listing for U |
|
 |
Top of page |
|