<?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 Heros in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253532#M175752</link>
    <description>Sorry .. Can't get on my head .. Are looking for some help ?.&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
    <pubDate>Tue, 20 Apr 2004 07:57:22 GMT</pubDate>
    <dc:creator>KapilRaj</dc:creator>
    <dc:date>2004-04-20T07:57:22Z</dc:date>
    <item>
      <title>Script Heros</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253531#M175751</link>
      <description>Ok, I am looking to consolidate all of my email notifications coming from the system. First, I want to get the all of emails from one location. And, then, create an include function for korn shell to include in all of my scripts. Here is and example of what I have so far,&lt;BR /&gt;cut ---------------&amp;gt;&lt;BR /&gt;for i in `cat /test/maillist | grep ADM | awk '{print $2}' `&lt;BR /&gt;    do&lt;BR /&gt;       mailx -s "`hostname` Make Recovery Status" $i &amp;lt; /tmp/make_tape_recovery.log&lt;BR /&gt;    done&lt;BR /&gt;cut ---------------&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I want to have emails going to diffent groups like ADM and USER. So, Ill I need to do is through it a permamiter on the group, subject and file that I want to send with the mail.&lt;BR /&gt;&lt;BR /&gt;I know this is a lot, but I know you guys love this stuff.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 07:47:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253531#M175751</guid>
      <dc:creator>hpuxrox</dc:creator>
      <dc:date>2004-04-20T07:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Script Heros</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253532#M175752</link>
      <description>Sorry .. Can't get on my head .. Are looking for some help ?.&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Tue, 20 Apr 2004 07:57:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253532#M175752</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-04-20T07:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script Heros</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253533#M175753</link>
      <description>Well, I'm afraid not to have understood :_(&lt;BR /&gt;&lt;BR /&gt;what you got is:&lt;BR /&gt; a file full of mail&lt;BR /&gt;&lt;BR /&gt;what you want is:&lt;BR /&gt; a mail, ok? But  containg what?&lt;BR /&gt;&lt;BR /&gt;Peace, R.&lt;BR /&gt;&lt;BR /&gt;in the meanwhile, in 'for' cycle you can use&lt;BR /&gt;awk '/ADM/ {print $2}'  /test/maillist</description>
      <pubDate>Tue, 20 Apr 2004 08:02:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253533#M175753</guid>
      <dc:creator>Roberto Polli</dc:creator>
      <dc:date>2004-04-20T08:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script Heros</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253534#M175754</link>
      <description>I can understand that you want to create a function to do your emailing, I don't understand what you mean by &lt;BR /&gt;&lt;BR /&gt;"get all of emails from one location" &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As far as mailing groups goes why don't you just make aliases, instead of parsing files? &lt;BR /&gt;&lt;BR /&gt;Then you can just email whatever group directly.</description>
      <pubDate>Tue, 20 Apr 2004 08:39:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253534#M175754</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-04-20T08:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Script Heros</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253535#M175755</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;This is playing with fire since there are so many variables.&lt;BR /&gt;&lt;BR /&gt;Why not change the scripts you have to mail themselves when a different default is needed&lt;BR /&gt;&lt;BR /&gt;Cron will automatically  send standard output  and eventually standard error  output to root or the owner of the crontab is you allow others to have cron.&lt;BR /&gt;&lt;BR /&gt;See cron.allow&lt;BR /&gt; &lt;BR /&gt;Output redirection to a specific mail address, disable/redirect the &lt;BR /&gt;standard output ,standard error and use a command in your script to send the &lt;BR /&gt;Crontab: &lt;BR /&gt;&lt;BR /&gt;47 11 * * * /usr/local/bin/testit  &amp;gt; /tmp/testit.out 2&amp;gt;&amp;amp;1 &lt;BR /&gt;&lt;BR /&gt;Output and error  are redirected with the 2&amp;gt;&amp;amp;1 and disables the standard mail . &lt;BR /&gt;&lt;BR /&gt;Cron Script: &lt;BR /&gt;# cat /usr/local/bin/testit&lt;BR /&gt;  #!/usr/bin/ksh &lt;BR /&gt;  echo "testit used at `date`" &lt;BR /&gt;  mailx -s testit.mail name@machine &amp;lt; /tmp/testit.out &lt;BR /&gt;  rm /tmp/testit.out &lt;BR /&gt;&lt;BR /&gt;Thus user on machine received email which had  the following : &lt;BR /&gt;"testit used at  Tue Apr 20 15:51:25 METDST 2004" &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope that will guide you&lt;BR /&gt;&lt;BR /&gt;                Steve Steel&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 08:48:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253535#M175755</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2004-04-20T08:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script Heros</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253536#M175756</link>
      <description>Hi if you want to have a central admin location to redidect all your cron emails here a way how you could do it:&lt;BR /&gt;&lt;BR /&gt;1. create a config file containing 2 columns&lt;BR /&gt;   1st Name of the cronjob&lt;BR /&gt;   2nd Email Adress (list)&lt;BR /&gt;i.e.&lt;BR /&gt;   DEFAULT:user1@domain1&lt;BR /&gt;   cronjob1:user1@domain1,user2@domain2&lt;BR /&gt;   cronjob2:user3@domain3&lt;BR /&gt;&lt;BR /&gt;2. modify all your cronjobs&lt;BR /&gt;2a.at the top of each job add&lt;BR /&gt;   MY_NAME=$(basename $0)&lt;BR /&gt;   exec &amp;gt; /tmp/$MY_NAME.$$.log&lt;BR /&gt;   exec 2&amp;gt; &amp;amp;1&lt;BR /&gt;2b at the end of each job add&lt;BR /&gt;   MAIL_ADDR=$(grep "^$MY_NAME:" /test/maillist | cut -d: -f2)&lt;BR /&gt;MAIL_ADDR=${MAIL_ADDR:-$(grep "^DEFAULT:" /test/maillist | cut -d: -f2)&lt;BR /&gt;cat /tmp/MY_NAME.$$.log | mailx -s "cronjob $MY_NAME on $(hostname)" $MAIL_ADDR&lt;BR /&gt;rm /tmp/MY_NAME.$$.log  # if you like&lt;BR /&gt;&lt;BR /&gt;hope this is what you wanted.....&lt;BR /&gt;regards&lt;BR /&gt;Juergen</description>
      <pubDate>Tue, 20 Apr 2004 09:33:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253536#M175756</guid>
      <dc:creator>Juergen Tappe</dc:creator>
      <dc:date>2004-04-20T09:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script Heros</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253537#M175757</link>
      <description>sorry at the second MAIL_ADDR= line I missed a closed bracket :&lt;BR /&gt;&lt;BR /&gt;MAIL_ADDR=${MAIL_ADDR:-$(grep "^DEFAULT:" /test/maillist | cut -d: -f2)}&lt;BR /&gt;&lt;BR /&gt;this should be correct now...</description>
      <pubDate>Tue, 20 Apr 2004 09:35:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253537#M175757</guid>
      <dc:creator>Juergen Tappe</dc:creator>
      <dc:date>2004-04-20T09:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Script Heros</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253538#M175758</link>
      <description>Another thing you could do, would be have all your systems, mail one system, and have a .forward for that systems user to whatever location you wanted. &lt;BR /&gt;&lt;BR /&gt;node a root -&amp;gt; .forward to wherever&lt;BR /&gt;node b -&amp;gt; mails node a root&lt;BR /&gt;etc.. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 09:38:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-heros/m-p/3253538#M175758</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-04-20T09:38:29Z</dc:date>
    </item>
  </channel>
</rss>

