egrep "^\*[^INDICATOR]" filename.txt

gurhan

On 9/6/07, Jerry <[EMAIL PROTECTED]> wrote:
> 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
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss@mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
>
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to