filesect.icn: Program to produce section of a file

March 26, 2002; Ralph E. Griswold
This file is in the public domain.
This program writes the section of the input file starting at a
specified line number and extending a specified number of lines.

The specifications are given as integer command-line arguments; the
first is the starting line, the second is the number of lines.  For
example,

     filesect 20 100 <input >output

copies 100 lines from input to output, starting at line 20 of input.

If the specifications are out of range, the file written is truncated
without comment.

Source code | Program Library Page | Icon Home Page