<?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: scripting help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721978#M63358</link>
    <description>Bill, I am sorry but I don't understand when you say the "'here' document technique"  What do you mean with that?</description>
    <pubDate>Sun, 12 May 2002 12:30:35 GMT</pubDate>
    <dc:creator>MAD_2</dc:creator>
    <dc:date>2002-05-12T12:30:35Z</dc:date>
    <item>
      <title>scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721976#M63356</link>
      <description>Hello all: I have a scripting question for all to chew on:&lt;BR /&gt;&lt;BR /&gt;I am trying to figure out how to take a script and make it peruse the syslog file and dmesg file plus other error logs for errors and put them into a single file, (THIS PART OF THE TASK IS NOT TOO DIFFICULT), The 2nd part of the equation is to take each of these files and FTP them from each system to one central system so that I can then combine all of the files into one single file to be emailed daily as a system error message file for all systems. I was wondering how to work the FTP from one system coding this part of it is driving me nuts. I was wondering if anyone might have some code that does FTP from each system and brings it back to one central point, i figure that I have to factor in being able to code the root password or equivelent password to be able to allow FTP to log in to the system. Just for information, ALL systems in our domain have the ability to FTP to each other. So if someone has an idea please let me know. Thanks in advance.&lt;BR /&gt;</description>
      <pubDate>Sun, 12 May 2002 00:45:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721976#M63356</guid>
      <dc:creator>fg_1</dc:creator>
      <dc:date>2002-05-12T00:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721977#M63357</link>
      <description>Here's a hint on searching for useful messages in syslog, dmesg, etc:&lt;BR /&gt;&lt;BR /&gt;grep -i -e warn -e err -e fail -e serious /var/adm/syslog/syslog.log&lt;BR /&gt;&lt;BR /&gt;For batch FTP, use the 'here' document technique:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;set -u&lt;BR /&gt;export PATH=/usr/bin&lt;BR /&gt;DEST=12.34.56.78&lt;BR /&gt;USER=ftpuser&lt;BR /&gt;PW=somepassword&lt;BR /&gt;LOCALCD=/var/temp/special&lt;BR /&gt;REMOTECD=/var/temp/collector&lt;BR /&gt;MYFILE=&lt;BR /&gt;ftp -n -v $DEST &amp;lt;&amp;lt; EOF&lt;BR /&gt;user $USER $PW&lt;BR /&gt;binary&lt;BR /&gt;lcd $LOCALCD&lt;BR /&gt;cd $REMOTECD&lt;BR /&gt;put $MYFILE&lt;BR /&gt;chmod 600 $MYFILE&lt;BR /&gt;&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;root password? Totally unnecassary and a big security risk. Send and receive your logfiles as an ordinary user (ie, ftpuser for instance).  This script must be 700 permission so no one except ftpuser can read or write it.</description>
      <pubDate>Sun, 12 May 2002 02:20:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721977#M63357</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-05-12T02:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721978#M63358</link>
      <description>Bill, I am sorry but I don't understand when you say the "'here' document technique"  What do you mean with that?</description>
      <pubDate>Sun, 12 May 2002 12:30:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721978#M63358</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2002-05-12T12:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721979#M63359</link>
      <description>Hi Mynor,&lt;BR /&gt;&lt;BR /&gt;the here- technique means, he uses a different EOF ("End of file") than the default. Let's explain with the mail- command:&lt;BR /&gt;&lt;BR /&gt;normally:&lt;BR /&gt;mail user@host (return)&lt;BR /&gt;text (return)&lt;BR /&gt;text (return)&lt;BR /&gt;ctrl-d  &lt;BR /&gt;&lt;BR /&gt;the ctrl-d combinations is the signal for the mail-command that his input is now over. Here- technique would be:&lt;BR /&gt;&lt;BR /&gt;mail user@host &amp;lt;&amp;lt; EOF (return)&lt;BR /&gt;text (return)&lt;BR /&gt;text (return)&lt;BR /&gt;EOF &lt;BR /&gt;&lt;BR /&gt;&amp;lt;&amp;lt; ----&amp;gt; tells your command, not to use the normal end of file- combination. (configurable over stty-command)&lt;BR /&gt;EOF ----&amp;gt; tells the command, for what to look instead. Here you can also write something else, but you have to take care, that your EOF- marker is a single word at the beginning of a line to get it work.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter&lt;BR /&gt;</description>
      <pubDate>Sun, 12 May 2002 14:10:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721979#M63359</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-05-12T14:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721980#M63360</link>
      <description>Hi Frank,&lt;BR /&gt;&lt;BR /&gt;Do you know the file .netrc?&lt;BR /&gt;Please read man netrc.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Mon, 13 May 2002 06:29:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721980#M63360</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-05-13T06:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721981#M63361</link>
      <description>Frank&lt;BR /&gt;&lt;BR /&gt;You can do all you want and lots more besides by using big brother. &lt;A href="http://www.bb4.com/" target="_blank"&gt;http://www.bb4.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And if you want to know about "here documents",  try &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.tldp.org/LDP/abs/html/here-docs.html" target="_blank"&gt;http://www.tldp.org/LDP/abs/html/here-docs.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;or HPs own shell users guide at &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/hpux/onlinedocs/B2355-90046/B2355-90046.html" target="_blank"&gt;http://docs.hp.com/hpux/onlinedocs/B2355-90046/B2355-90046.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Graham</description>
      <pubDate>Mon, 13 May 2002 07:04:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721981#M63361</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2002-05-13T07:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721982#M63362</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;You can use tail -f&lt;BR /&gt;&lt;BR /&gt;tail -f /var/adm/syslog/syslog.log |remsh topaz "cat - &amp;gt; /tmp/xantia 2&amp;gt;&amp;amp;1"&amp;amp;&lt;BR /&gt;&lt;BR /&gt;This reads my syslog as it is filled up and writes a copy on machine topaz in /tmp/machine&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Like this you can filter&lt;BR /&gt;&lt;BR /&gt;tail -f /var/adm/syslog/syslog.log|while read line&lt;BR /&gt;do&lt;BR /&gt;echo $line|grep -i error&lt;BR /&gt;echo $line|grep -i warning&lt;BR /&gt;done|remsh topaz "cat - &amp;gt; /tmp/xantia 2&amp;gt;&amp;amp;1"&lt;BR /&gt;&lt;BR /&gt;process stays open but avoids all the ftp opens and closes&lt;BR /&gt;&lt;BR /&gt;                Steve Steel</description>
      <pubDate>Mon, 13 May 2002 11:56:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/2721982#M63362</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-05-13T11:56:43Z</dc:date>
    </item>
  </channel>
</rss>

