a simple question about grep
    Whelan, Paul 
    Paul.Whelan at fmr.com
       
    Thu Sep  6 16:47:14 EDT 2007
    
    
  
grep '[^*?INDICATOR]' filename.txt
  _____  
From: gnhlug-discuss-bounces at mail.gnhlug.org
[mailto:gnhlug-discuss-bounces at mail.gnhlug.org] On Behalf Of Jerry
Sent: Thursday, September 06, 2007 4:38 PM
To: gnhlug-discuss at mail.gnhlug.org
Subject: a simple question about grep
Hi, 
I have a text file whose content looks like below: 
*INDICATOR name1 zip1 
geoid gender location 
*INDICATOR name2 zip2 
*geoid gender location 
INDICATOR name3 zip3 
*district court 
I want to pick up all lines starting with "*" but no "INDICATOR" 
followed. 
So for the example above, I want to pick up the following 2 lines: 
(the 3rd line) *geoid gender location 
(the last line) *district court 
How to construct regular expression with grep as a one-line command to
achieve this goal? Or any other simple solutions?
Thank you!
Zhao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20070906/bcc3c108/attachment.html 
    
    
More information about the gnhlug-discuss
mailing list