Regular Expression Trouble

Andrew P. infofarmer at gmail.com
Fri Dec 9 14:42:17 PST 2005


On 12/10/05, Martin McCormick <martin at dc.cis.okstate.edu> wrote:
>         After reading  a bit about extended regular expressions and
> having a few actually work correctly in sed scripts, I tried one in
> egrep and it isn't working although there are no errors.
>
>         I was hoping to get only the A records from a dns zone file so
> the expression I used is:
>
> egrep [[:space:]IN[:space:]A[:space:]] zone_file >h0
>
>         Had it worked, all that would have appeared in the h0 file was
> all the A or Address records.  Instead, I get those plus almost
> everything else in the file.  It is obviously not filtering correctly.
> Plain grep produces a 0-length output file so that is not too useful
> either.  Putting double quotes around the RE didn't help either.
>
>         It seems to match almost everything.
>
>         Thanks for any good ideas.
>
> Martin McCormick WB5AGZ  Stillwater, OK
> OSU Information Technology Department Network Operations Group
> .-- -... ..... .- --. --..
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>

Isn't it a character class consisting of a white-space
and three letters?


More information about the freebsd-questions mailing list