<?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: My script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567090#M872440</link>
    <description>Hi Martyn,&lt;BR /&gt;&lt;BR /&gt;On your ftp command line, append as follows:&lt;BR /&gt;ftp -n $host &amp;lt; ftp.check.log 2&amp;gt; ftp.check.err&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;!&lt;BR /&gt;&lt;BR /&gt;then you can interrogate the log and err files for detailed analysis after each ftp command.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin</description>
    <pubDate>Mon, 20 Aug 2001 09:04:07 GMT</pubDate>
    <dc:creator>Robin Wakefield</dc:creator>
    <dc:date>2001-08-20T09:04:07Z</dc:date>
    <item>
      <title>My script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567089#M872439</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have this script below (getaudit):-&lt;BR /&gt;# Requires file Hostnames.txt in the local directory.  This file contains&lt;BR /&gt;# a list of system hostnames, one to a line.&lt;BR /&gt;#&lt;BR /&gt;if [ -f Hostnames.txt ]&lt;BR /&gt;then for host in `cat Hostnames.txt`&lt;BR /&gt;     do ftp -n $host &amp;lt;&amp;lt;@END&lt;BR /&gt;           user ******* ********&lt;BR /&gt;           cd /tmp&lt;BR /&gt;           asc&lt;BR /&gt;           get audit&lt;BR /&gt;@END&lt;BR /&gt;echo $host&lt;BR /&gt;        mv audit $host.audit&lt;BR /&gt;        done&lt;BR /&gt;else echo $0: Cannot find Hostnames.txt&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Basically it collects a system audit file from each system in hostnames.txt and I would like to get more clear output/error messages from it.  When it works, it echoes back the hostname but when it fails i don't get much information.  I would like the output to look something like:-&lt;BR /&gt;&lt;BR /&gt;&lt;HOSTNAME&gt; Start of audot for &lt;HOSTNAME&gt;&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;End of audit for &lt;HOSTNAME&gt;&lt;BR /&gt;&lt;BR /&gt;It's just to better understand the output when it scrolls down the screen, any help would be gratefully received.&lt;BR /&gt;&lt;BR /&gt;Kind Regards,&lt;BR /&gt;&lt;BR /&gt;Martyn&lt;/HOSTNAME&gt;&lt;/HOSTNAME&gt;&lt;/HOSTNAME&gt;</description>
      <pubDate>Mon, 20 Aug 2001 08:43:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567089#M872439</guid>
      <dc:creator>Martyn Foster</dc:creator>
      <dc:date>2001-08-20T08:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: My script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567090#M872440</link>
      <description>Hi Martyn,&lt;BR /&gt;&lt;BR /&gt;On your ftp command line, append as follows:&lt;BR /&gt;ftp -n $host &amp;lt; ftp.check.log 2&amp;gt; ftp.check.err&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;!&lt;BR /&gt;&lt;BR /&gt;then you can interrogate the log and err files for detailed analysis after each ftp command.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin</description>
      <pubDate>Mon, 20 Aug 2001 09:04:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567090#M872440</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-08-20T09:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: My script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567091#M872441</link>
      <description>Hi&lt;BR /&gt;  You can write the stderr into file by saying&lt;BR /&gt;2&amp;gt;err.lst&lt;BR /&gt;   &lt;BR /&gt;ex:-&lt;BR /&gt;   ls 2&amp;gt;err.lst    write the errors generated by the command into the err.lst file&lt;BR /&gt;  You can do something like that for all the commands where you want to capture the error messages.&lt;BR /&gt;&lt;BR /&gt;...BPK...&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Aug 2001 09:46:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567091#M872441</guid>
      <dc:creator>Praveen Bezawada</dc:creator>
      <dc:date>2001-08-20T09:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: My script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567092#M872442</link>
      <description>Hi martyn,&lt;BR /&gt;&lt;BR /&gt;Try the following, it may help u.FTPLOG=/tmp/ftplog&lt;BR /&gt;if [ -f host.name ]&lt;BR /&gt;then&lt;BR /&gt;   for hostname in `cat host.name`&lt;BR /&gt;   do&lt;BR /&gt;        ftp -n $hostname &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;        user ******* *******&lt;BR /&gt;        cd /etc&lt;BR /&gt;        ascii&lt;BR /&gt;        get hosts&lt;BR /&gt;        bye&lt;BR /&gt;        EOF&lt;BR /&gt;        echo $hostname&lt;BR /&gt;        mv hosts $hostname.hosts&lt;BR /&gt;   done 1&amp;gt;$FTPLOG 2&amp;gt;&amp;amp;1&lt;BR /&gt;else&lt;BR /&gt;        echo "File name doesn't exists" &amp;gt;&amp;gt;$FTPLOG&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Joe.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Aug 2001 08:43:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/my-script/m-p/2567092#M872442</guid>
      <dc:creator>Joseph Chakkery</dc:creator>
      <dc:date>2001-08-21T08:43:03Z</dc:date>
    </item>
  </channel>
</rss>

