Loading ...
Sorry, an error occurred while loading the content.

RE: [PBML] How to remove a line in data file

Expand Messages
  • Smith, Sheldon
    If *all* you want to do is remove lines beginning with 19, other possibilities are perl -ne print if !/^19/ infile outfile or perl -pe s/^19.* Z n//
    Message 1 of 8 , Aug 4, 2000
    • 0 Attachment
      If *all* you want to do is remove lines beginning with 19, other
      possibilities are
      perl -ne 'print if !/^19/' infile >outfile
      or
      perl -pe 's/^19.*\Z\n//' infile >outfile

      Then use your OS to make outfile take the place of infile.

      Enjoy....

      > -----Original Message-----
      > From: joach@... [mailto:joach@...]
      >
      > I am trying to piece together a small script which will scrub
      > lines from
      > a data file.
      > The idea would be to delete all lines beginning with 19 and leave all
      > other lines intact.
    Your message has been successfully submitted and would be delivered to recipients shortly.