In article <[email protected]>,
Michelle Konzack <[email protected]> wrote:
> Hello Matus UHLAR - fantomas,
>
> Am 2010-11-09 14:13:47, hacktest Du folgendes herunter:
> > I am not sure whether dnswalk over whole internet can do that, but on your
>
> I will try it...
>
> > server you can either run recursive grep over named data directory, or dump
> > the named dsatabase and grep it...
>
> This is what I currently do...
>
> ----[ '/usr/sbin/get_hosts_in cname' ]----------------------------------
> #!/bin/sh
>
> QUERY="$1"
>
> for FILE in $(cd /etc/bind && ls *.signed)
> do
> grep --regexp=" IN CNAME .*${QUERY}" /etc/bind/${FILE} 2>/dev/null |cut -d
> ' ' -f1 |sed 's|.$||'
> done
> ------------------------------------------------------------------------
It would probably be faster if you didn't start a new grep process for
each file. Try:
find /etc/bind -name '*.signed' | xargs sed -n "/ IN CNAME .*$QUERY/s/\.
.*$//p"
--
Barry Margolin, [email protected]
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***
_______________________________________________
bind-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/bind-users