Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cat(1) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

pg(1)

pr(1)

rmnl(1)

ssp(1)

CAT(1)

NAME

cat − concatenate, copy, and print files

SYNOPSIS

cat [ −u ] [ −s ] [ −v [−t] [−e] ] file ...

DESCRIPTION

Cat reads each file in sequence and writes it on the standard output.  Thus:

cat file

prints the file, and:

cat file1 file2 >file3

concatenates the first two files and places the result on the third. 

If no input file is given, or if the argument − is encountered, cat reads from the standard input file, enabling you to combine standard input with other files. 

The options are:

−u causes output to be unbuffered (character-by-character); normally, output is buffered. 

−s makes cat silent about non-existent files, identical input and output, and write errors.  Normally, no input file may be the same as the output file unless it is a special file.  (The 4.2BSD cat -s feature is provided by ssp(1).)

−v causes non-printing characters (with the exception of tabs, new-lines and form-feeds) to be printed visibly.  Control characters are printed ^X (control-X); the DEL character (octal 0177) is printed ^?.  All other non-printing characters are printed as M−x, where x is the character specified by the seven low order bits.  This option is influenced by the LANG environment variable and its corresponding code set. 

−t when used with the −v option, −t causes tabs to be printed as ^I’s. 

−e when used with the −v option, causes a $ character to be printed at the end of each line (prior to the new-line). 

The −t and −e options are ignored if the −v option is not specified. 

RETURN VALUE

Exit values are:

 0 Successful completion. 

>0 Error condition occured. 

SEE ALSO

cp(1), pg(1), pr(1), rmnl(1), ssp(1). 

WARNING

Command formats such as

cat file1 file2 >file1

overwrites the data in file1 before the concatenation begins.  Therefore, take care when using shell special characters. 

EXTERNAL INFLUENCES

Environment Variables

LC_CTYPE determines the interpretation of text and filenames as single and/or multi-byte characters. 

LANG determines the language in which messages are displayed. 

If LC_CTYPE is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable.  If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.  If any internationalization variable contains an invalid setting, cat behaves as if all internationalization variables are set to "C".  See environ(5).

International Code Set Support

Single- and multi-byte character code sets are supported. 

STANDARDS CONFORMANCE

cat: SVID2, XPG2, XPG3

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026