![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cat operation | trichyselva | UNIX for Dummies Questions & Answers | 0 | 03-24-2008 06:55 AM |
| Help with arithmetic operation | emjayshaikh | Shell Programming and Scripting | 3 | 09-24-2007 12:44 AM |
| RPC failure on yp operation | Remi | SUN Solaris | 1 | 05-22-2007 11:15 AM |
| split operation | scotty_123 | Shell Programming and Scripting | 1 | 04-05-2007 09:34 AM |
| string operation | fongthai | Shell Programming and Scripting | 6 | 11-24-2006 06:26 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
if i then use the code to look up DNS then should i do it with nslookup host or dig?...i know dig is more useful which i read ....but if you could state the use of IFS then it will be great.
Last edited by ravis83; 08-27-2008 at 09:42 PM.. |
|
||||
|
Recent versions of host can perform a reverse DNS lookup directly on the IP address. If you have an older version, or wish to use dig or some other tool, you have to convert the IP address into the format used internally for reverse DNS lookups. Here is an example.
Code:
OLDIFS=$IFS IFS=. set -- $ip IFS=$OLDIFS echo IP=$ip, hostname=`dig +short ptr $4.$3.$2.$1.in-addr.arpa.` |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|