<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: nslookup shell script with input and output files in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957645#M95000</link>
    <description>ok great!  that works well, is it possible to make a tweek request, it should not be more than a quick if statement, I don't know how errors work in nix world yet but if name or ip is resolvable can the file have &lt;BR /&gt;&lt;IP or="" fqdn=""&gt; - resolves&lt;BR /&gt;and if it doesn't&lt;BR /&gt;&lt;IP or="" fqdn=""&gt; - does not resolve&lt;BR /&gt;Thanks so far, your help is very much appreciated!&lt;/IP&gt;&lt;/IP&gt;</description>
    <pubDate>Wed, 07 Mar 2007 17:52:02 GMT</pubDate>
    <dc:creator>jamesatwork</dc:creator>
    <dc:date>2007-03-07T17:52:02Z</dc:date>
    <item>
      <title>nslookup shell script with input and output files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957643#M94998</link>
      <description>Hello! Please help!&lt;BR /&gt;I have a slight dilema, the data in my forward and reverse zones differ quite a bit.  How would I write a shell script that would take an input file list of fqdn or ip and run nslookup on them and output a log file based on the results?  I wrote one a while ago for batch but I am just learning unix/shell.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=960329" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=960329&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Is very close to what I need.  Thanks in advance!</description>
      <pubDate>Wed, 07 Mar 2007 16:11:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957643#M94998</guid>
      <dc:creator>jamesatwork</dc:creator>
      <dc:date>2007-03-07T16:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: nslookup shell script with input and output files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957644#M94999</link>
      <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;This could be as simple as:&lt;BR /&gt;&lt;BR /&gt;# cat .mylookup.sh&lt;BR /&gt;while read ADDR&lt;BR /&gt;do&lt;BR /&gt;    nslookup ${ADDR} | tee -a mylookup.log&lt;BR /&gt;done &amp;lt; mylookup&lt;BR /&gt;&lt;BR /&gt;...where 'mylookup' is a file with one IP or FQDN per line:&lt;BR /&gt;&lt;BR /&gt;10.10.11.12&lt;BR /&gt;host01.xyz.net&lt;BR /&gt;host02.xyz.net&lt;BR /&gt;&lt;BR /&gt;...run as:&lt;BR /&gt;&lt;BR /&gt;# ./mylookup.sh&lt;BR /&gt;&lt;BR /&gt;...Your output will be written to your terminal and to the 'mylookup.log' file.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 07 Mar 2007 16:20:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957644#M94999</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-03-07T16:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: nslookup shell script with input and output files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957645#M95000</link>
      <description>ok great!  that works well, is it possible to make a tweek request, it should not be more than a quick if statement, I don't know how errors work in nix world yet but if name or ip is resolvable can the file have &lt;BR /&gt;&lt;IP or="" fqdn=""&gt; - resolves&lt;BR /&gt;and if it doesn't&lt;BR /&gt;&lt;IP or="" fqdn=""&gt; - does not resolve&lt;BR /&gt;Thanks so far, your help is very much appreciated!&lt;/IP&gt;&lt;/IP&gt;</description>
      <pubDate>Wed, 07 Mar 2007 17:52:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957645#M95000</guid>
      <dc:creator>jamesatwork</dc:creator>
      <dc:date>2007-03-07T17:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: nslookup shell script with input and output files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957646#M95001</link>
      <description>&lt;!--!*#--&gt;Hi (again):&lt;BR /&gt;&lt;BR /&gt;OK, here's a simple hack:&lt;BR /&gt;&lt;BR /&gt;# cat ./mylookup&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;while read ADDR&lt;BR /&gt;do&lt;BR /&gt;    RESULT=`nslookup ${ADDR} | grep -E "^Address:"`&lt;BR /&gt;    if [ ! -z "${RESULT}" ]; then&lt;BR /&gt;        echo  "${ADDR} is_ok" | tee -a mylookup.log&lt;BR /&gt;    fi&lt;BR /&gt;done &amp;lt; mylookup&lt;BR /&gt;&lt;BR /&gt;...run this just as you did the first version.  Good results have a line in their output that begins with "Address:".  The caret (^) anchors the pattern to match to the beginning of the line.  Thus only lines that start with "Address:" are captured.  If nothing matches, then 'nslookup' reports the target in the error returned, so we just print that.&lt;BR /&gt;&lt;BR /&gt;Have a look at the manpages for 'nslookup'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 07 Mar 2007 19:00:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957646#M95001</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-03-07T19:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: nslookup shell script with input and output files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957647#M95002</link>
      <description>thank you!! that is the start I needed, cheers!</description>
      <pubDate>Wed, 07 Mar 2007 19:08:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nslookup-shell-script-with-input-and-output-files/m-p/3957647#M95002</guid>
      <dc:creator>jamesatwork</dc:creator>
      <dc:date>2007-03-07T19:08:30Z</dc:date>
    </item>
  </channel>
</rss>

