# FIRST v1.20 - copy first n lines

#### Revised 18-Aug-97. Copyright (c) 1996-97 by Rune Berg. TextTools Freeware.

Usage - Description - Options - Return codes

### USAGE

first [log logfile] [option] n [infile] [to outfile]

### DESCRIPTION

first copies the n first lines of infile to outfile.

If infile has n or fewer lines, then first copies all of infile.

n must be an integer in the range 0 .. 2147483647.

If you don't specify infile, first reads from standard input.
If you don't specify outfile, first writes to standard output.
If you don't specify logfile, first writes error messages to standard error.

### OPTIONS

first recognizes the following command line options:

Option | Function
--- | ---
-v | Print version banner and usage info to standard error (or logfile, if given), then exit.

### RETURN CODES

first returns with one of the following codes ("error levels"):

Code | Meaning
--- | ---
0 | Success
102 | Incorrect command line arguments
104 | Error opening file
105 | I/O error
107 | File name clash

##### End of document