Contained Within
Find More Documentation
Featured Support Resources
| Scarica il manuale in formato PDF
NAME
- cat - concatenate and display files
SYNOPSIS
-
cat [ -bnsuvet ] filename. . .
AVAILABILITY
- SUNWcsu
DESCRIPTION
-
cat reads each filename in sequence and writes it on the standard output. Thus:
-
-
example% cat filename
prints filename on your terminal, and:
example% cat filename1 filename2 >filename3
- concatenates filename1 and filename2, and writes the results in filename3.
- If no input file is given, or if the argument - is encountered, cat reads from the standard input file.
OPTIONS
-
- -b
- Number the lines, as -n, but omit the line numbers from blank lines.
-
- -n
- Precede each line output with its line number.
-
- -u
- The output is not buffered. (The default is buffered output.)
-
- -s
-
cat is silent about non-existent files.
-
- -v
- Non-printing characters (with the exception of tabs, new-lines and form-feeds) are printed visibly. ASCII control characters (octal 000 - 037) are printed as ^n, where n is the corresponding ASCII character in the range octal 100 - 137 (@, A, B, C, . . ., X, Y, Z, [, \, ], ^, and _); the DEL character (octal 0177) is printed ^?. Other non-printable characters are printed as M-x, where x is the ASCII character specified by the low-order seven bits.
- When used with the -v option, the following options may be used:
-
- -t
- Tabs will be printed as ^I's and formfeeds to be printed as ^L's.
-
- -e
- A $ character will 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.
ENVIRONMENT
- If any of the LC_ *variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the environment, the operational behavior of cat for each corresponding locale category is determined by the value of the LANG environment variable. If LC_ALL is set, its contents are used to override both the LANG and the other LC_ *variables. If none of the above variables is set in the environment, the "C" (U.S. style) locale determines how cat behaves.
-
LC_CTYPE
- Determines how cat handles characters. When LC_CTYPE is set to a valid value, cat can display and handle text and filenames containing valid characters for that locale. cat can display and handle Extended Unix Code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide. cat can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
-
LC_MESSAGES
- Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses. In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English).
SEE ALSO
-
cp(1), pg(1), pr (1),environ(5)
NOTES
- Redirecting the output of cat onto one of the files being read will cause the loss of the data originally in the file being read. For example,
-
example% cat filename1 filename2 >filename1
- causes the original data in filename1 to be lost.
|
|