[ale] Flat file post-processing - drop records based on text string

James P. Kinney III jkinney at localnetsolutions.com
Thu Jul 28 22:49:21 EDT 2005


On Thu, 2005-07-28 at 17:06 -0400, Geoffrey wrote:
> brucelists at bellsouth.net wrote:
> > Hey - I've got a basic question. I have a huge text file, and am
> > looking to drop records based on what is found in the text string. If
> > a record has the text "rs232", "slip", "decnet" or "VA-1" anywhere in
> > it, I want to drop it. If not, I want to keep the record.
> > 
> > Is there a simple string I can use to do this? I'm not sure if I just
> > want to run a search string, or go Perl - but either way, I have a
> > huge filebut most of needs to be dropped.
> 
> perl:
> 
> while (<>) { /rs232|slip|decnet|VA-1/ && next; print; }
> 
> awk:
> 
> '/rs232|slip|decnet|VA-1/ {next}; {print $0;}'

windows: fdisk /mba
> 
-- 
James P. Kinney III          \Changing the mobile computing world/
CEO & Director of Engineering \          one Linux user         /
Local Net Solutions,LLC        \           at a time.          /
770-493-8244                    \.___________________________./
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part




More information about the Ale mailing list