Doh! I've sent a wrong version of script, with errors. Here's a correct one:
#!/bin/bash NET=192.168.111 HOST=example.com LIMIT=254 for ((i=1;i<= LIMIT ; i++)) do IP=`echo $NET.$i` ARPA=`host $NET.$i | awk '{print $5}'` FIRSTOCT=`echo $IP $ARPA | grep NX | awk '{print $1}' | cut -d . -f1` SECOCT=`echo $IP $ARPA | grep NX | awk '{print $1}' | cut -d . -f2` THIRDOCT=`echo $IP $ARPA | grep NX | awk '{print $1}' | cut -d . -f3` LASTOCT=`echo $IP $ARPA | grep NX | awk '{print $1}' | cut -d . -f4` PTR=`echo host$LASTOCT.$THIRDOCT.$SECOCT.$FIRSTOCT.$HOST | grep -v 't\.'` echo $LASTOCT.$THIRDOCT.$SECOCT.$FIRSTOCT.in-addr.arpa. IN PTR $PTR. | egrep -v '^\.' done 2010/11/1 big bond <bondar...@gmail.com> > Sorry, first message was sent not for the list but to Alan only. (by the > way, why "reply" button does not send message to list by default?) > > 2010/10/30 Alan Clegg <acl...@isc.org> > >> On 10/30/2010 1:42 AM, Sukman wrote: >> >> >> Looking to write a script to create the PTR records.. >> >> Not much on the Web.. >> > >> > > >
_______________________________________________ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users