User's Guide for MS-DOS Clients
306
Connecting to a LAN Manager for UNIX Systems Server
Converting Text Files
Guidelines for Using the Ud Command
When you are not sure of the format of a text file, use the ud command with
the -d or -u option to convert the file to the format you need. If the file is
already in that format, the command output (filename2) will be identical to
the original file.
If you do not enter a second filename, the file is converted, and its text is
displayed on your screen.
If you enter a second filename, be sure the filename is different from the first
filename. If the filename is the same, the contents of the file that you want to
convert will be deleted.
Options
The ud command has the following options:
-d
Converts a file to MS-DOS format.
-u
Converts a file to UNIX system format.
NOTE: If you use either -d or -u for a file that is already in the specified conversion format,
the command output (filename2) will be identical to the original file.
-z
affects the ^Z character. MS-DOS files often have ^Z as the last byte in the file.
When converting a UNIX system file to MS-DOS format, the -z option does not
put ^Z at the end of the file. When converting an MS-DOS file, the -z option
forces ud to ignore any ^Z characters in the file. Without the -z option, the
conversion stops when the first ^Z is encountered.
Piping and Redirecting Converted Files
You can use the pipe operator ( | ) with the ud command to send a
reformatted file to a program. For example, to convert a file named
UNIXTEXT from UNIX system format to MS-DOS format and display the
converted file a screenful at a time, pipe the output of ud to the MS-DOS
more utility by using the following command: