Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

head(1) OSS Shell and Utilities Reference Manual
NAME
head - Displays the beginning of a le
SYNOPSIS
head [-c bytes][-n lines][le ...]
FLAGS
-c bytes Species the number of bytes (not characters) to display. If the last byte written is not
a newline character, a newline character is appended to the output.
-n lines Species the number of lines to display. The default value for lines is 10.
DESCRIPTION
The head command prints the rst lines lines or bytes bytes of each of the specied les to the
standard output le.
If you do not specify le, head displays from the standard input le.
Environment Variables
This command supports the use of the LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and
NLSPATH environment variables.
EXAMPLES
To display the rst 5 lines of a le named test,enter:
head -n 5 test
EXIT VALUES
The head command returns the following values:
0 (zero) The command completed sucessfully.
>0 An error occurred.
RELATED INFORMATION
Commands: cat(1), more(1), tail(1).
STANDARDS CONFORMANCE
This command conforms to the XPG4 Version 2 specication.
The following feature is an extension to the XPG4 Version 2 specication:
The -c ag is supported.
442 Hewlett-Packard Company 527188-004