a simple question about grep
G.O.
gurhan.ozen at gmail.com
Thu Sep 6 16:50:22 EDT 2007
egrep "^\*[^INDICATOR]" filename.txt
gurhan
On 9/6/07, Jerry <greenmt at gmail.com> 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 at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
>
More information about the gnhlug-discuss
mailing list