<?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 Shell errors in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/shell-errors/m-p/3316571#M12876</link>
    <description>Dear gurus,&lt;BR /&gt;&lt;BR /&gt;How can trap shell messages (stdout/stderr) into a perl script?.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;I want to trap my faild jobs (in cron) and email me using perl script. &lt;BR /&gt;I don't want cron to send me mail for security reasons.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Mon, 28 Jun 2004 02:54:59 GMT</pubDate>
    <dc:creator>Sivasingam Santhakumar</dc:creator>
    <dc:date>2004-06-28T02:54:59Z</dc:date>
    <item>
      <title>Shell errors</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-errors/m-p/3316571#M12876</link>
      <description>Dear gurus,&lt;BR /&gt;&lt;BR /&gt;How can trap shell messages (stdout/stderr) into a perl script?.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;I want to trap my faild jobs (in cron) and email me using perl script. &lt;BR /&gt;I don't want cron to send me mail for security reasons.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 28 Jun 2004 02:54:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-errors/m-p/3316571#M12876</guid>
      <dc:creator>Sivasingam Santhakumar</dc:creator>
      <dc:date>2004-06-28T02:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Shell errors</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-errors/m-p/3316572#M12877</link>
      <description>Well, you could pipe the output into a perl script with something like this.&lt;BR /&gt; &lt;BR /&gt;scriptname.sh 2&amp;gt;&amp;amp;1 | perl_script.pl&lt;BR /&gt; &lt;BR /&gt;This will work with cron or anything else in fact.&lt;BR /&gt; &lt;BR /&gt;If the perl script reads &lt;STDIN&gt; it will get both the errors and the normal output in the above case.&lt;BR /&gt; &lt;BR /&gt;&lt;/STDIN&gt;</description>
      <pubDate>Mon, 28 Jun 2004 03:44:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-errors/m-p/3316572#M12877</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-28T03:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Shell errors</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-errors/m-p/3316573#M12878</link>
      <description>Try somethink like&lt;BR /&gt;&lt;BR /&gt;command 2&amp;gt; /tmp/$$.err || \&lt;BR /&gt;    errorMail.pl /tmp/$$.err&lt;BR /&gt;rm $$.err&lt;BR /&gt;&lt;BR /&gt;This will send the stderr output if command &lt;BR /&gt;exits with an error status.&lt;BR /&gt;&lt;BR /&gt;Or &lt;BR /&gt;&lt;BR /&gt;command 2&amp;gt; /tmp/$$.err&lt;BR /&gt;[ -s /tmp/$$.err ] &amp;amp;&amp;amp; errorMail.pl /tmp/$$.err&lt;BR /&gt;rm $$.err&lt;BR /&gt;&lt;BR /&gt;This will send an email if you have output on&lt;BR /&gt;stderr.&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jun 2004 09:28:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-errors/m-p/3316573#M12878</guid>
      <dc:creator>Bill Thorsteinson</dc:creator>
      <dc:date>2004-06-29T09:28:35Z</dc:date>
    </item>
  </channel>
</rss>

