Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!mcnc!rti!rac From: rac@rti.rti.org (Roger Connor) Newsgroups: comp.editors Subject: editing pblm; need help Summary: global deletion after a pattern, not including the pattern Message-ID: <1991Mar22.161201.7437@rti.rti.org> Date: 22 Mar 91 16:12:01 GMT Sender: rac.rti.rti.org (Roger Connor) Followup-To: comp.editors Distribution: usa Organization: Research Triangle Institute, RTP, NC Lines: 24 I have a ASCII text file that I need to edit inorder to import the information into dBase. I am using vi/ex/ed/sed as necessary. The records are as follows: 000001;VENDOR1;PO BOX;CITY1;STATE1;ZIP1;ADDRESS;CITY2;ST2;ZIP2;(000)000-0000;LASTNAME;FIRSTNAME;NET ??*;MANY CHARACTERS OF JUNK TO END OF LINE Note that NET can be followed by 10, 30, INVOICE, or some other series of characters. What I need to do is locate NET*; on the line, and delete the rest of the line from the semicolon, including the semicolon. I have tried: g/;NET.*;/s/;.*$// g/\<;NET.*;\>/s/\>.*$//g and sed -e '/^\C.*;NET.*;\)\(.*)$/s//\1/' Any suggestions welcome. Please email as I do not normally read this group. Thanks VERY much; it's a 4Meg file!! Roger -- USENET: rac@rti.rti.org.UUCP \___/ Roger A. Connor, Jr. landline: (919)541-6285 (O(O) 3211-25 University Station Rd. /```\ Durham, NC 27705