need help on unix

Leslie Mikesell les at chinet.chi.il.us
Wed Jun 12 00:20:27 AEST 1991


In article <1991Jun11.005723.22179 at unixg.ubc.ca> wangf at unixg.ubc.ca (Frank Wang) writes:
>Is that possible to delete some lines from a file (the file is so large that  
>it's impossible to use any editor) without evoking any editors?

Sure, if you can describe the portion to delete to sed (the stream editor)
using line numbers or unique patterns in the text to identify the portion
to delete:

  sed 'begin,endd' <oldfile >newfile
should do it, where begin and end are either line numbers or a pattern
enclosed in //'s.

Les Mikesell
  les at chinet.chi.il.us



More information about the Comp.unix.admin mailing list