in message <[EMAIL PROTECTED]>,
wrote Glenn Dawson thusly...
>
> At 02:12 PM 12/9/2005, Martin McCormick wrote:
> >
> >        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.
> try:
> 
> egrep "IN[^[:alnum:]]+A" zone_file

For even finer results, use word boundaries ...

  egrep '\bIN[^[:alnum:]]+A\b' file
  egrep '\<IN[[:space:]]+A\>'  file


  - Parv

-- 

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to