pcat Command
Purpose
Unpacks files and writes them to standard output.
Syntax
pcat File ...
Description
The pcat command reads the files designated by the File parameter, unpacks them, and writes them to standard output. Whether or not the specified file ends in the .z characters, the pcat command assumes that the file is packed and unpacks it.
The exit value of the pcat command is the number of files it was unable to unpack. A file cannot be unpacked if any of the following occurs:
- The file name (exclusive of .z) has more than 253 bytes.
- The file cannot be opened.
- The file is not a packed file.
Exit Status
This command returns the following exit values:
Item | Description |
---|---|
0 | Successful completion. |
>0 | An error occurred. |
Examples
- To display compressed
files, enter:
This command sequence displays the compressed files chap1.z and chap2.z on the screen in expanded form, a page at a time ( | pg ). Note that the pcat command accepts files with and without the .z characters.pcat chap1.z chap2 | pg
- To use a compressed file
without expanding the copy stored on disk, enter:
This command sequence prevents the pcat command from displaying the contents of chap1.z in its expanded form and pipes it to the grep command.pcat chap1.z | grep 'Greece'
File
Item | Description |
---|---|
/usr/bin/pcat | Contains the pcat command. |