head: Print the first few lines of a text file

Package: system

Usage

head files

Parameters

files
The list of files to be dealt with, quite possibly given as a template, such a "image*".
nlines = 12
The number of lines to be printed.

Description

Head prints, on the standard output, the first nlines of each file that matches the given file list. If the file list has more than one name in it, a short header precedes each listing.

Examples

1. Print the first 12 lines of each help file in the current directory.

cl> head *.hlp

2. Print the first line of each help file.

cl> head *.hlp nl=1

3. Print the most recently defined set environment definitions.

cl> set | head

See also

tail, page