Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uiucdcsb!kenny From: kenny@uiucdcsb.cs.uiuc.edu Newsgroups: comp.unix.questions Subject: Re: wanted: utility to extract lines by Message-ID: <166400008@uiucdcsb> Date: 7 Apr 88 21:08:00 GMT References: <1600@lll-lcc.aRpA> Lines: 26 Nf-ID: #R:lll-lcc.aRpA:1600:uiucdcsb:166400008:000:579 Nf-From: uiucdcsb.cs.uiuc.edu!kenny Apr 7 15:08:00 1988 /* Written 11:07 am Apr 6, 1988 by uejio@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