wanted: utility to extract lines by
kenny at uiucdcsb.cs.uiuc.edu
kenny at uiucdcsb.cs.uiuc.edu
Fri Apr 8 07:08:00 AEST 1988
/* Written 11:07 am Apr 6, 1988 by uejio at lll-lcc.aRpA in uiucdcsb:comp.unix.questions */
/* ---------- "wanted: utility to extract lines by" ---------- */
Does anyone know of a utility which will extract the nth line of a
file?
/* End of text from uiucdcsb:comp.unix.questions */
head -n file | tail +m
will isolate lines m-n from file.
Example:
------------------------------------------------------------------------
% cat foo
this
is
a
test
of
extracting
lines
% head -4 foo | tail +3
a
test
------------------------------------------------------------------------
Kevin
More information about the Comp.unix.questions
mailing list