Copyright: The UNIX Exchange ® 1995 Mick Meaden


Contents

Introduction

The UNIX Exchange provides facilities for converting to and from common UNIX file formats.  This is especially useful for users of the Internet and the World Wide Web (WWW), where UNIX file formats tend to dominate.  This version includes the following conversion programs:

•	dos2unix/unix2dos.  Convert files between UNIX and DOS text file formats; that is, <carriage-return><linefeed> on DOS and  <linefeed> on UNIX.

•	uuencode/uudecode.  The encoding technique supported by these programs is commonly used on UNIX systems to transmit files across mail networks that may not be transparent to 8-bit data.  The encoding is such that 3 octets in the source file are converted to 4 octets in the output, where each 6-bits in the source is stored as a separate output octet and made printable by adding 0x20.  Data so encoded can safely be transmitted across any network, including public networks, without unwanted side-effects.

•	compress/uncompress.  These two programs compress and uncompress files using a common UNIX file compression technique.  Files downloaded from the Internet or WWW will often use this technique rather than DOS-like ZIP compression.

•	gzip/gunzip.  Provide a Windows front-end to GNU gzip(1) and gunzip(1), which compress files using a slightly more sophisticated algorithm than compress(1).  Note that gzip.exe is an external DOS program that can be downloaded from the Web and most Bulletin Board Systems.  For example, it can be found in the UNIX Forum on CompuServe.

Procedures

The UNIX Exchange is designed for use from the WInXs menu in File Manager, where the input file can (optionally) be identified by using standard File Manager selection mechanisms.  This program is not recommended for use from Program Manager directly.

On return from The UNIX Exchange, the File Manager file window will be updated to reflect any changes made by the above conversion programs.

Reference

dos2unix

unix2dos

uuencode

uudecode

compress

uncompress

gzip

gunzip


dos2unix

NAME

dos2unix - convert DOS to UNIX text file format

DESCRIPTION

dos2unix takes one or more input text files in DOS format (CR-LF line terminated) and converts them to UNIX format (LF line terminated).  Many programs are insensitive to which format is used in a text file, while others produce strange output or will not work at all unless the correct format is used.

OPERANDS

From File/Directory:

Specifies a filespec (e.g., readme.txt), a partspec (e.g., *.txt) or a dirspec naming the input file or files.  If a partspec is specified, all matching files in the current directory will be converted; if a dirspec is specified, all files in the named directory will be converted.  Note that only one 'spec of any type can be specified on each invocation of the program.   A filespec can be specified either by typing the name of a file in this field or by double-clicking a filename in the directory listbox.

To File/Directory:

Specifies the output filespec or dirspec.  If a filespec or partspec is specified as the input file, and no output file is specified, the input file(s) is converted in-situ.

Current Directory:

Gives the name of the current working directory.  This can be changed by double-clicking a directory name in the associated listbox.  Drives can be changed by double-clicking a drive number.

UNIX Name (Uuencode):

Not used (ignored).


unix2dos

NAME

unix2dos - convert UNIX to DOS text file format

DESCRIPTION

unix2dos takes one or more input text files in UNIX format (LF line terminated) and converts them to DOS format (CR-LF line terminated).  Many programs are insensitive to which format is used in a text file, while others produce strange output or will not work at all unless the correct format is used

OPERANDS

From FIle/Directory:

Specifies a filespec (e.g., readme.txt), a partspec (e.g., *.txt) or a dirspec naming the input file or files.  If a partspec is specified, all matching files in the current directory will be converted; if a dirspec is specified, all files in the named directory will be converted.  Note that only one 'spec of any type can be specified on each invocation of the program.   A filespec can be specified either by typing the name of a file in this field or by double-clicking a filename in the directory listbox.

To File/Directory:

Specifies the output filespec or dirspec.  If a filespec or partspec is specified as the input file, and no output file is specified, the input file(s) is converted in-situ.

Current Directory:

Gives the name of the current working directory.  This can be changed by double-clicking a directory name in the associated listbox.  Drives can be changed by double-clicking a drive number.

UNIX Name (Uuencode)

Not used (ignored).


uuencode

NAME

uuencode - encode a binary file

DESCRIPTION

This utility writes an encoded version of the named input file to the named output file.  The output is encoded using standard UNIX codings and may be transferred to a UNIX system and decoded thereon.  The output file is a text file of the following format:

begin <mode> <filename>
<encoded-file-text>
end

Where <mode> is set for compatibility with a UNIX system but is only used on DOS to identify read-only files, and <filename> is the same as the input file name.

OPERANDS

From File/Directory:

Specifies the name of the input file (partspecs are not allowed).  If no separate "unixname" is given, this will also be the name of the file that will be created when the output file is decoded.   A filespec can be specified either by typing the name of a file in this field or by double-clicking a filename in the directory listbox.

To File/Directory

Specifies the name of the output file, which is mandatory for this utility; that is, files cannot be uuencoded in-situ.

Current Directory:

Gives the name of the current working directory.  This can be changed by double-clicking a directory name in the associated listbox.  Drives can be changed by double-clicking a drive number.

UNIX Name (Uuencode):

Optionally specifies a UNIX filename, which is the name of the file that will be created when the output file is decoded on a UNIX system; that is, this value is stored in <filename> rather than the name of the input file.


uudecode

NAME

uudecode - decode a binary file

DESCRIPTION

This utility writes a decoded version of the named input file to a named output file, using either <filename> (see below) or a named output file .  The output is decoded using standard UNIX codings and may be transferred from a UNIX system.  The input file is a text file of the following format:

begin <mode> <filename>
<encoded-file-text>
end

Where <mode> is set for compatibility with a UNIX system but is only used on DOS to identify read-only files, and <filename> is the name of the output file.  Because UNIX filenames may not be reproducible on a DOS system, <filename> can be over-ridden by specifying a new name in the "To File/Directory" field of the main dialog.

OPERANDS

From File/Directory:

Specifies the name of the input file (partspecs are not allowed).  A filespec can be specified either by typing the name of a file in this field or by double-clicking a filename in the directory listbox.

To File/Directory:

Optionally, specifies the name of the output file.  If this field is blank, the output filename is taken from <filename> in the encoded file.

Current Directory:

Gives the name of the current working directory.  This can be changed by double-clicking a directory name in the associated listbox.  Drives can be changed by double-clicking a drive number.

UNIX Name (Uuencode):

Not used (ignored).


COMPRESS

NAME

compress - compress data in a file or files

DESCRIPTION

This program compresses files and produces output in a form that is compatible with the UNIX compress(1) command.  Files can be compressed in-situ, so unlike gzip(1) the names of compressed files are not changed, or they can be compressed to a named output file.

OPERANDS

From File/Directory:

Specifies a filespec (e.g., readme.txt) or a partspec (e.g., *.txt) naming the input file or files.  If a partspec is specified, all matching files in the current directory will be compressed (although note that only one 'spec of either type can be specified per invocation).  A filespec can be specified either by typing the name of a file in this field or by double-clicking a filename in the directory listbox.

To File/Directory

By default, files will be compressed in-situ.  If, however, an output filename is specified in this field, and a single filename is specified as input, then the compressed file will be written to the named ouput file instead.  This field is ignored if a partspec is specified in the input field.

Current Directory

Gives the name of the current working directory.  This can be changed by double-clicking a directory name in the associated listbox.  Drives can be changed by double-clicking a drive number.

UNIX Name (Uuencode)

Not used (ignored).


UNCOMPRESS

NAME

uncompress - restore a compressed file to its original state

DESCRIPTION

Restore files previously compressed using compress(1) to their original state.  Files can be uncompressed in-situ, so unlike gunzip(1) their names are not changed by this operation, or they can be uncompressed to a named output file.

OPERANDS

From File/Directory:

Specifies a filespec (e.g., readme.txt) or a partspec (e.g., *.txt) naming the input file or files.  If a partspec is specified, all matching files in the current directory will be uncompressed (although note that only one 'spec of either type can be specified per invocation).  A filespec can be specified either by typing the name of a file in this field or by double-clicking a filename in the directory listbox.

To File/Directory

By default, files will be uncompressed in-situ.  If, however, an output filename is specified in this field, and a single filename is specified as input, then the uncompressed file will be written to the named ouput file instead.  This field is ignored if a partspec is specified in the input field.

Current Directory:

Gives the name of the current working directory.  This can be changed by double-clicking a directory name in the associated listbox.  Drives can be changed by double-clicking a drive number.

UNIX Name (Uuencode):

Not used (ignored).


GZIP

NAME

gzip - compress data in a file or files

DESCRIPTION

Like compress(1), this utility attempts to reduce the size of a named file or files, albeit that the algorithm it uses tends to produce better compression ratios.  Each file will be replaced in its compressed form with the last character of the file extension changed to a "z",  or the suffiz ".gz" will be added if the file has no extension.

OPERANDS

From File/Directory:

Specifies a filespec (e.g., readme.txt) or a partspec (e.g., *.txt) naming the input file or files.  If a partspec is specified, all matching files in the current directory will be compressed (although note that only one 'spec of either type can be specified per invocation).  A filespec can be specified either by typing the name of a file in this field or by double-clicking a filename in the directory listbox.

To File/Directory:

Not used (ignored).

Current Directory:

Gives the name of the current working directory.  This can be changed by double-clicking a directory name in the associated listbox.  Drives can be changed by double-clicking a drive number.

UNIX Name (Uuencode):

Not used (ignored).

NOTE !!!!

This facility requires the external DOS program GZIP.EXE, which is available free of charge under the terms and conditions of the GNU software licence.  Download the program from the Internet or any BBS and save it in your WinXs directory.  On CompuServe, GZIP.EXE is available in the UNIX Forum.


GUNZIP

NAME

gunzip - uncompress data in a file or files

DESCRIPTION

Restores files to their original state after they have been compressed using the gzip utility.  Each file will be replaced in its uncompressed form with the gzip suffix removed (i.e., ".gz" or a trailing "z" in the extension).

OPERANDS

From File/Directory:

Specifies a filespec (e.g., readme.gz) or a partspec (e.g., *.gz) naming the input file or files.  If a partspec is specified, all matching files in the current directory will be uncompressed (although note that only one 'spec of either type can be specified per invocation).  A filespec can be specified either by typing the name of a file in this field or by double-clicking a filename in the directory listbox.

To File/Firectory:

Not used (ignored).

Current Directory:

Gives the name of the current working directory.  This can be changed by double-clicking a directory name in the associated listbox.  Drives can be changed by double-clicking a drive number.

UNIX Name (Uuencode)

Not used (ignored).

NOTE !!!!

This facility requires the external DOS program GZIP.EXE, which is available free of charge under the terms and conditions of the GNU software licence.  Download the program from the Internet or any BBS and save it in your WinXs directory.  On CompuServe, GZIP.EXE is available in the UNIX Forum.