Doh! I've sent a wrong version of script, with errors. Here's a correct one:<br><br>#!/bin/bash<br>NET=192.168.111<br>HOST=<a href="http://example.com">example.com</a><br>LIMIT=254<br> for ((i=1;i<= LIMIT ; i++))<br>
do <br> IP=`echo $NET.$i`<br> ARPA=`host $NET.$i | awk '{print $5}'`<br> FIRSTOCT=`echo $IP $ARPA | grep NX | awk '{print $1}' | cut -d . -f1`<br> SECOCT=`echo $IP $ARPA | grep NX | awk '{print $1}' | cut -d . -f2`<br>
THIRDOCT=`echo $IP $ARPA | grep NX | awk '{print $1}' | cut -d . -f3`<br> LASTOCT=`echo $IP $ARPA | grep NX | awk '{print $1}' | cut -d . -f4`<br> PTR=`echo host$LASTOCT.$THIRDOCT.$SECOCT.$FIRSTOCT.$HOST | grep -v 't\.'`<br>
echo $LASTOCT.$THIRDOCT.$SECOCT.$FIRSTOCT.in-addr.arpa. IN PTR $PTR. | egrep -v '^\.'<br> done<br><br><br><div class="gmail_quote">2010/11/1 big bond <span dir="ltr"><<a href="mailto:bondarets@gmail.com">bondarets@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">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?) <br>
<br><div class="gmail_quote"><div class="im">2010/10/30 Alan Clegg <span dir="ltr"><<a href="mailto:aclegg@isc.org" target="_blank">aclegg@isc.org</a>></span><br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>On 10/30/2010 1:42 AM, Sukman wrote:<div class="im"><br>
>> Looking to write a script to create the PTR records..<br>
>> Not much on the Web..<br>
><br></div></div></div></blockquote><br></div><br>
</blockquote></div><br>