Date: Wed, 02 Sep 1998 16:11:54 -0400 From: Roman Katsnelson <romank@graphnet.com> To: "q's" <freebsd-questions@FreeBSD.ORG> Subject: grep question Message-ID: <35EDA68A.F931FA64@graphnet.com>
next in thread | raw e-mail | index | archive | help
Hi, I have a flat data file with fields that are 16 lines long, of which the third line is always unique. I need to be able to automate deleting these records. When I do this: grep -e "unique_string" -A 13 -B 2 database.file it works fine and shows me the record, and only the record. I thought I could use the -v flag like this: grep -e "unique_string" -A 13 -B 2 -v database.file to get an output of everything BUT the record, and from that point it's a piece of cake. however, that command returns the entire file. i read the man pages about 45 trillion times and i really can't come up with anything else to do. is this even possible with grep or should i just break down and use perl? Thanks as always, Roman -- /-------------------------------------------------------------------\ |Roman Katsnelson | "If voting could result in any | |Unix SysAdmin | significant changes, it would be | |Graphnet | illegal." WWW.WAIT.ORG | \-------------------------------------------------------------------/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35EDA68A.F931FA64>