<?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 help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400960#M200799</link>
    <description>[ -z /var/mail/file ] || mailx "file not empty" abc@xyz.com&lt;BR /&gt;&lt;BR /&gt;Anil</description>
    <pubDate>Fri, 15 Oct 2004 07:07:19 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2004-10-15T07:07:19Z</dc:date>
    <item>
      <title>script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400959#M200798</link>
      <description>I need help writing a script. I want to check a /var/mail/user file to see if it is empty. If it is , do nothing if it isnt, then I am going to cut some info out of the nmail message and mail it to my cell through telalert. I only need help with the 1st part.&lt;BR /&gt;&lt;BR /&gt;Test&lt;BR /&gt;If file is empty&lt;BR /&gt;do nothing&lt;BR /&gt;if it isnt&lt;BR /&gt;do this kind of thing.</description>
      <pubDate>Fri, 15 Oct 2004 07:03:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400959#M200798</guid>
      <dc:creator>Nobody's Hero</dc:creator>
      <dc:date>2004-10-15T07:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400960#M200799</link>
      <description>[ -z /var/mail/file ] || mailx "file not empty" abc@xyz.com&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Fri, 15 Oct 2004 07:07:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400960#M200799</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-10-15T07:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400961#M200800</link>
      <description>if [[ $(wc -l /var/mail/user| cut -f1 -d" ") -eq 0 ]]; then&lt;BR /&gt;&lt;DO nothing=""&gt;&lt;BR /&gt;else&lt;BR /&gt;&lt;DO something=""&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Jean-Luc&lt;/DO&gt;&lt;/DO&gt;</description>
      <pubDate>Fri, 15 Oct 2004 07:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400961#M200800</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2004-10-15T07:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400962#M200801</link>
      <description>Have a look at Ian's script(s) in the following post:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=718563" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=718563&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 15 Oct 2004 08:26:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400962#M200801</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-10-15T08:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400963#M200802</link>
      <description>We can do effective check as,&lt;BR /&gt;&lt;BR /&gt; if [[ -f filename &amp;amp;&amp;amp; ! -s filename ]]&lt;BR /&gt; then&lt;BR /&gt;&lt;BR /&gt;      echo "File exists with zero length"&lt;BR /&gt;      # Action to do&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;We can use ls -s &lt;FILENAME&gt; to get file size too,&lt;BR /&gt;&lt;BR /&gt; if [[ -f filename ]]&lt;BR /&gt; then&lt;BR /&gt;&lt;BR /&gt;   # File exits&lt;BR /&gt;   if [[ $(ls -s | awk '{ print $1 }') -eq 0 ]]&lt;BR /&gt;   then&lt;BR /&gt;&lt;BR /&gt;     # action to do here.&lt;BR /&gt;   fi&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;/FILENAME&gt;</description>
      <pubDate>Fri, 15 Oct 2004 08:47:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400963#M200802</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-10-15T08:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400964#M200803</link>
      <description>&lt;BR /&gt; [ ! -s /var/mail/file ] || action to do&lt;BR /&gt;&lt;BR /&gt; [ -s /var/mail/file ] &amp;amp;&amp;amp; action to do&lt;BR /&gt;&lt;BR /&gt;It also work there.</description>
      <pubDate>Fri, 15 Oct 2004 08:54:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3400964#M200803</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-10-15T08:54:48Z</dc:date>
    </item>
  </channel>
</rss>

