<?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: Need a script for the below actions in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362621#M639613</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1105300"&gt;@Sreer&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;I need to develop a script for the below scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My scripting skill is not so good..&lt;/P&gt;&lt;P&gt;I need to have a script for the below setup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - check if /home/nullecte is defined in local /etc/auto_home&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;If no, send an alert ("/home/nullecte not defined on host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;and then, exit script&lt;/P&gt;&lt;P&gt;&amp;nbsp;2 - check availability of node "nullecte"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If no, send an alert ("/home/nullecte not available from host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;and then, exit script&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;3 - check if there are differencies between&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/etc/auto_home and /home/nullecte/TechD/ref/auto_home&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If no -&amp;gt; nothing to do&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If yes -&amp;gt; replace local /etc/auto_home by ref (/home/nullecte/TechD/ref/auto_home)&lt;/P&gt;&lt;P&gt;&amp;nbsp;4 - check if there are differencies between&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/etc/auto_home and /home/nullecte/TechD/ref/auto_home&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If yes -&amp;gt; send an alert ("auto_home inconsistency on host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;could you please help me to get a script for this?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt; &lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help or write?&amp;nbsp; The best way to learn how to do something is to try!&amp;nbsp;&amp;nbsp; Here's some pointers, comment by comment:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#1 Consider 'grep'.&amp;nbsp; For example, 'grep -q nullecte /etc/auto_home' will return a zero exit status if a match is found.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#2 Define "availability".&amp;nbsp; Do you mean ping-able?&amp;nbsp; Do you mean a particular process is running?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#3 'diff' is your friend.&amp;nbsp; Read its manpages.&amp;nbsp; As for replacements, look at 'sed', in the general form of 'sed -e '/this/that/' infile &amp;gt; outfile'.&amp;nbsp; By the way, what do you mean by " ref (/home/nullecte/TechD/ref/auto_home)"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#4 'diff' again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for sending mail, simple alerts can be composed thusly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# echo "I want help" | mailx -s "HELP!" sreer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...where "I want help" is the body of the message and "HELP!" is the subject and you are the recipient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If everything you want to say is in the sublect line, do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# mailx -s "HELP HELP HELP" sreer &amp;lt; /dev/null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2011 18:50:42 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2011-10-14T18:50:42Z</dc:date>
    <item>
      <title>Need a script for the below actions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362585#M639612</link>
      <description>&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to develop a script for the below scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My scripting skill is not so good..&lt;/P&gt;&lt;P&gt;I need to have a script for the below setup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - check if /home/nullecte is defined in local /etc/auto_home&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;If no, send an alert ("/home/nullecte not defined on host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;and then, exit script&lt;/P&gt;&lt;P&gt;&amp;nbsp;2 - check availability of node "nullecte"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If no, send an alert ("/home/nullecte not available from host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;and then, exit script&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;3 - check if there are differencies between&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/etc/auto_home and /home/nullecte/TechD/ref/auto_home&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If no -&amp;gt; nothing to do&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If yes -&amp;gt; replace local /etc/auto_home by ref (/home/nullecte/TechD/ref/auto_home)&lt;/P&gt;&lt;P&gt;&amp;nbsp;4 - check if there are differencies between&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/etc/auto_home and /home/nullecte/TechD/ref/auto_home&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If yes -&amp;gt; send an alert ("auto_home inconsistency on host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;could you please help me to get a script for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Sree&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2011 18:18:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362585#M639612</guid>
      <dc:creator>Sreer</dc:creator>
      <dc:date>2011-10-14T18:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script for the below actions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362621#M639613</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1105300"&gt;@Sreer&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;I need to develop a script for the below scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My scripting skill is not so good..&lt;/P&gt;&lt;P&gt;I need to have a script for the below setup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 - check if /home/nullecte is defined in local /etc/auto_home&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;If no, send an alert ("/home/nullecte not defined on host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;and then, exit script&lt;/P&gt;&lt;P&gt;&amp;nbsp;2 - check availability of node "nullecte"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If no, send an alert ("/home/nullecte not available from host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;and then, exit script&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;3 - check if there are differencies between&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/etc/auto_home and /home/nullecte/TechD/ref/auto_home&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If no -&amp;gt; nothing to do&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If yes -&amp;gt; replace local /etc/auto_home by ref (/home/nullecte/TechD/ref/auto_home)&lt;/P&gt;&lt;P&gt;&amp;nbsp;4 - check if there are differencies between&lt;BR /&gt;&amp;nbsp;&amp;nbsp;/etc/auto_home and /home/nullecte/TechD/ref/auto_home&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;If yes -&amp;gt; send an alert ("auto_home inconsistency on host ...") by email to :&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="mailto:sree@abc.com"&gt;sree@abc.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;could you please help me to get a script for this?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt; &lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help or write?&amp;nbsp; The best way to learn how to do something is to try!&amp;nbsp;&amp;nbsp; Here's some pointers, comment by comment:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#1 Consider 'grep'.&amp;nbsp; For example, 'grep -q nullecte /etc/auto_home' will return a zero exit status if a match is found.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#2 Define "availability".&amp;nbsp; Do you mean ping-able?&amp;nbsp; Do you mean a particular process is running?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#3 'diff' is your friend.&amp;nbsp; Read its manpages.&amp;nbsp; As for replacements, look at 'sed', in the general form of 'sed -e '/this/that/' infile &amp;gt; outfile'.&amp;nbsp; By the way, what do you mean by " ref (/home/nullecte/TechD/ref/auto_home)"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#4 'diff' again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for sending mail, simple alerts can be composed thusly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# echo "I want help" | mailx -s "HELP!" sreer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...where "I want help" is the body of the message and "HELP!" is the subject and you are the recipient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If everything you want to say is in the sublect line, do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# mailx -s "HELP HELP HELP" sreer &amp;lt; /dev/null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2011 18:50:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362621#M639613</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-10-14T18:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script for the below actions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362627#M639614</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your extreme help...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iam trying to make it up with your help...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will let you know if it win/Loss :-)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Sree&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2011 18:55:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362627#M639614</guid>
      <dc:creator>Sreer</dc:creator>
      <dc:date>2011-10-14T18:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script for the below actions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362633#M639615</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1105300"&gt;@Sreer&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;Iam trying to make it up with your help...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will let you know if it win/Loss :-)&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt; &lt;P&gt;Hi (again) Sreer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You win as long as you try!&amp;nbsp; When you are stuck, post what you have tried.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2011 19:03:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-for-the-below-actions/m-p/5362633#M639615</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-10-14T19:03:02Z</dc:date>
    </item>
  </channel>
</rss>

