From owner-freebsd-questions@FreeBSD.ORG Wed Mar 14 11:35:13 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 420B916A401 for ; Wed, 14 Mar 2007 11:35:13 +0000 (UTC) (envelope-from alex@schnarff.com) Received: from outbound.mailhop.org (outbound.mailhop.org [63.208.196.171]) by mx1.freebsd.org (Postfix) with ESMTP id 18E2E13C455 for ; Wed, 14 Mar 2007 11:35:12 +0000 (UTC) (envelope-from alex@schnarff.com) Received: from c-68-49-149-185.hsd1.va.comcast.net ([68.49.149.185] helo=schnarff.com) by outbound.mailhop.org with esmtpa (Exim 4.63) (envelope-from ) id 1HRRlA-000DNm-4X for freebsd-questions@freebsd.org; Wed, 14 Mar 2007 07:35:12 -0400 Received: (qmail 20499 invoked by uid 67); 14 Mar 2007 11:35:11 -0000 Received: from 192.168.2.68 ([192.168.2.68]) by mail.schnarff.com (Horde) with HTTP for ; Wed, 14 Mar 2007 07:35:11 -0400 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 68.49.149.185 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: schnarff Message-ID: <20070314073511.k4e93l6kz4okw80c@mail.schnarff.com> Date: Wed, 14 Mar 2007 07:35:11 -0400 From: alex@schnarff.com To: bstitt@tsys.com References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.4) Cc: freebsd-questions@freebsd.org Subject: Re: Need a good Unix script that.. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 11:35:13 -0000 Why not use Perl? It'd be as simple as: #!/usr/bin/perl use strict; open(IN, "$ARGV[0]") || die "Can't open $ARGV[0]: $!\n"; while () { print $_ unless ($_ =~ //); } close IN; Save this script as "filter.pl" (or whatever you want to call it), and then just run "perl filter.pl > ", which will pipe out all the lines you do want to . Alex Kirk > Hello, > > I'm trying to write a script to delete all line that include a certain > pattern in an output file. I sending information to one of our Security > people and they take this data and create a spreadsheet on the > information, I have a constant reoccurring lines within the output file > that they do not need. I'm trying to use the sed command to remove lines > that fits a certain pattern but it does not appear to remove anything. > > Any helpful ideas or any useful links to scripts. > > Thanks so much.. > > Bruce Stitt > TSYS Hosting Services > Voice 706-644-0965 > > ----------------------------------------- > The information contained in this communication (including any > attachments hereto) is confidential and is intended solely for the > personal and confidential use of the individual or entity to whom > it is addressed. The information may also constitute a legally > privileged confidential communication. If the reader of this > message is not the intended recipient or an agent responsible for > delivering it to the intended recipient, you are hereby notified > that you have received this communication in error and that any > review, dissemination, copying, or unauthorized use of this > information, or the taking of any action in reliance on the > contents of this information is strictly prohibited. If you have > received this communication in error, please notify us immediately > by e-mail, and delete the original message. Thank you > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >