<?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: shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593159#M33149</link>
    <description>Hi Vasu:&lt;BR /&gt;&lt;BR /&gt;I've attached a 2 minute script that should be very close (with a little more work, you coud make a cron job out of it):&lt;BR /&gt;&lt;BR /&gt;to send mail:&lt;BR /&gt;df | mail scott@mail.com&lt;BR /&gt;&lt;BR /&gt;That does make the big assumption that you have sendmail configured.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
    <pubDate>Thu, 11 Oct 2001 13:15:18 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2001-10-11T13:15:18Z</dc:date>
    <item>
      <title>shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593156#M33146</link>
      <description>hello,&lt;BR /&gt;i need to create  a shell script &lt;BR /&gt;step 1. look for the file - mail_file.dat  in '/watch'  directory.&lt;BR /&gt;step 2. rename with time stamp. move it to '/log' directory.&lt;BR /&gt;step 3. run a job(script) 'cst101.shl'  as the abou file as input parameter.&lt;BR /&gt;     like  -  cst101.shl mail_file_mmddyy.da0t&lt;BR /&gt;step 4. if it fails send the 'unable to run script at step 1/step2/step3'&lt;BR /&gt;         to a 'scott@mail.com, lance@mail.com'&lt;BR /&gt;&lt;BR /&gt;one more question&lt;BR /&gt;&lt;BR /&gt;5. how to send a command(like 'df') output to ' scott@mail.com'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks in advance.&lt;BR /&gt; &lt;BR /&gt;vasu</description>
      <pubDate>Thu, 11 Oct 2001 12:53:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593156#M33146</guid>
      <dc:creator>vas  bolpali</dc:creator>
      <dc:date>2001-10-11T12:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593157#M33147</link>
      <description>these man pages should help&lt;BR /&gt;grep&lt;BR /&gt;mv&lt;BR /&gt;mailx sendmail&lt;BR /&gt;&lt;BR /&gt;for the script..&lt;BR /&gt;grep file /watch&lt;BR /&gt;mv file /log&lt;BR /&gt;touch -t&lt;DATE&gt; /log/file&lt;BR /&gt;&lt;BR /&gt;df -k &amp;gt; /tmp/dfout&lt;BR /&gt;/usr/lib/sendmail user@domain.com &amp;lt; /tmp/dfout&lt;BR /&gt;&lt;BR /&gt;&lt;/DATE&gt;</description>
      <pubDate>Thu, 11 Oct 2001 13:07:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593157#M33147</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2001-10-11T13:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593158#M33148</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;here my suggestions:&lt;BR /&gt; &lt;BR /&gt;if [ -s /watch/mail_file.dat ]&lt;BR /&gt;then&lt;BR /&gt;newname=/log/mail_file_$(date +%m%d%y.dat).dat&lt;BR /&gt;mv /watch/mail_file.dat $newname&lt;BR /&gt;cst101.shl $newname&lt;BR /&gt;if [ $? != 0 ]&lt;BR /&gt;then&lt;BR /&gt;  echo "unable to run script $newname"|mail scott@mail.com lance@mail.com&lt;BR /&gt;fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Qestion 5: df | mail scott@mail.com&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 11 Oct 2001 13:07:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593158#M33148</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2001-10-11T13:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593159#M33149</link>
      <description>Hi Vasu:&lt;BR /&gt;&lt;BR /&gt;I've attached a 2 minute script that should be very close (with a little more work, you coud make a cron job out of it):&lt;BR /&gt;&lt;BR /&gt;to send mail:&lt;BR /&gt;df | mail scott@mail.com&lt;BR /&gt;&lt;BR /&gt;That does make the big assumption that you have sendmail configured.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
      <pubDate>Thu, 11 Oct 2001 13:15:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/2593159#M33149</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-10-11T13:15:18Z</dc:date>
    </item>
  </channel>
</rss>

