<?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: Script problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769771#M74353</link>
    <description>Hi &lt;BR /&gt;&lt;BR /&gt;Either the PATH or just put the following :&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;admin1=raje@abc.com&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/opt/omni/bin/omnirpt -report list_sessions -timeframe 24 24 &amp;gt; /ss/omnirpt.txt&lt;BR /&gt;&lt;BR /&gt;mailx -s "List of Omnibackup Sessions for the last 24 hours" $admin1 &amp;lt; /ss/omnirpt.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;also you can star the script wiht !/usr/bin/sh -x in debug mode and find out the error in the mail of root if the script fails.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 23 Jul 2002 02:42:30 GMT</pubDate>
    <dc:creator>MANOJ SRIVASTAVA</dc:creator>
    <dc:date>2002-07-23T02:42:30Z</dc:date>
    <item>
      <title>Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769768#M74350</link>
      <description>Hi,&lt;BR /&gt;I have written a small script with files permission (777) and root:sys as owner:group which collects the list of sessions of Omniback for the last 24 hours and send me an emal. This is running through cron at 8:30 am.&lt;BR /&gt;&lt;BR /&gt;It has been observed that I receive an email of blank text. But when I run it manually it send me proper report in the text.&lt;BR /&gt;&lt;BR /&gt;Script attached.&lt;BR /&gt;&lt;BR /&gt;What is the problem? What needs to be checked?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Raje.</description>
      <pubDate>Tue, 23 Jul 2002 00:09:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769768#M74350</guid>
      <dc:creator>Sanjiv Sharma_1</dc:creator>
      <dc:date>2002-07-23T00:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769769#M74351</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;This one is easy; you are a victim of cron's intentionally sparse environment.&lt;BR /&gt;&lt;BR /&gt;You need to add these lines lines to your script:&lt;BR /&gt;&lt;BR /&gt;PATH=${PATH}:/opt/omni/bin:/opt/omni/lbin&lt;BR /&gt;export PATH&lt;BR /&gt;&lt;BR /&gt;I would also have this script generate a temp file name rather than using a hard-coded name; that's generally considered bad form.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;TDIR=${TMPDIR:-/var/tmp}&lt;BR /&gt;PIS=${$}&lt;BR /&gt;T1=${TDIR}/X${PID}_1.txt&lt;BR /&gt;&lt;BR /&gt;You then direct omnirpt's stdout to ${T1} and your mail commands stdin is ${T1}. After the mail, you do a rm -d ${T1} to delete the file.&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Jul 2002 00:42:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769769#M74351</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-07-23T00:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769770#M74352</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;set ur path as Clay suggested or in your crontab include some thing like this.&lt;BR /&gt;&lt;BR /&gt;0 * * * * sh &lt;YOUR script="" complete="" path=""&gt;&lt;BR /&gt;&lt;BR /&gt;regds&lt;BR /&gt;&lt;/YOUR&gt;</description>
      <pubDate>Tue, 23 Jul 2002 02:36:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769770#M74352</guid>
      <dc:creator>V. V. Ravi Kumar_1</dc:creator>
      <dc:date>2002-07-23T02:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769771#M74353</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;Either the PATH or just put the following :&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;admin1=raje@abc.com&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/opt/omni/bin/omnirpt -report list_sessions -timeframe 24 24 &amp;gt; /ss/omnirpt.txt&lt;BR /&gt;&lt;BR /&gt;mailx -s "List of Omnibackup Sessions for the last 24 hours" $admin1 &amp;lt; /ss/omnirpt.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;also you can star the script wiht !/usr/bin/sh -x in debug mode and find out the error in the mail of root if the script fails.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Jul 2002 02:42:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2769771#M74353</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-07-23T02:42:30Z</dc:date>
    </item>
  </channel>
</rss>

