<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542254#M865710</link>
    <description>Basically, the comma-separated slashes define the start and end address.&lt;BR /&gt;sed looks for a match on the 1st address, and stops looking when it matches on the 2nd address.&lt;BR /&gt;The -n says "don't print anything", the p says "output only what matches".  These two switched are invariably used together.&lt;BR /&gt;&lt;BR /&gt;Robin</description>
    <pubDate>Wed, 20 Jun 2001 11:01:38 GMT</pubDate>
    <dc:creator>Robin Wakefield</dc:creator>
    <dc:date>2001-06-20T11:01:38Z</dc:date>
    <item>
      <title>Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542249#M865705</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;  I just in need of U Guys help for a Script..&lt;BR /&gt;&lt;BR /&gt;  The thing I am trying is &lt;BR /&gt; &lt;BR /&gt;    * using /usr/include/sys/errno.h &lt;BR /&gt;&lt;BR /&gt;  I am trying to write a script which will accept error number as the input&lt;BR /&gt;&lt;BR /&gt;and will give the detail on that error..&lt;BR /&gt;&lt;BR /&gt;  From errno.h I managed to extract the one line report for the given error number..&lt;BR /&gt;&lt;BR /&gt;  But then I need one more thing..&lt;BR /&gt;&lt;BR /&gt;  It should take the detailed description for that error from the man page of errno&lt;BR /&gt;&lt;BR /&gt;and give me the description from that man page..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example :&lt;BR /&gt;&lt;BR /&gt;   Suppose if I give number 227 for the script..&lt;BR /&gt;&lt;BR /&gt;   It should take the following line from /usr/include/sys/errno.h&lt;BR /&gt;&lt;BR /&gt;   and should extract ONLY THE DEFINITION of EADDRNOTAVAIL from man page..&lt;BR /&gt;&lt;BR /&gt;   Please give me a awk/sed script for doing this..&lt;BR /&gt;&lt;BR /&gt;/usr/include/sys/errno.h&lt;BR /&gt;=========================&lt;BR /&gt;&lt;BR /&gt;    #  define EADDRNOTAVAIL         227     /* Can't assign requested address */&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Man page extract of ERRNO..&lt;BR /&gt;===========================&lt;BR /&gt;&lt;BR /&gt; [EADDRNOTAVAIL]&lt;BR /&gt;                     Cannot assign requested address.  Normally results from&lt;BR /&gt;                     an attempt to create a socket with an address not on&lt;BR /&gt;                     this machine.&lt;BR /&gt;&lt;BR /&gt; [EAFNOSUPPORT]      Address family not supported by protocol family.  An&lt;BR /&gt;                     address incompatible with the requested protocol was&lt;BR /&gt;                     used.  For example, you should not necessarily expect&lt;BR /&gt;                     to be able to use PUP Internet addresses with ARPA&lt;BR /&gt;                     Internet protocols.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;  Thanks for Ur time and the Help&lt;BR /&gt;&lt;BR /&gt;Sundar&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Jun 2001 12:42:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542249#M865705</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2001-06-19T12:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542250#M865706</link>
      <description>man errno | sed -n '/.*NOTAVAIL.*/,/^$/p'&lt;BR /&gt;&lt;BR /&gt;as an example, would be a good start.&lt;BR /&gt;&lt;BR /&gt;Robin.</description>
      <pubDate>Tue, 19 Jun 2001 14:48:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542250#M865706</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-06-19T14:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542251#M865707</link>
      <description>Thanks so much..&lt;BR /&gt;&lt;BR /&gt;U really deserve 20 but then only 10 possible&lt;BR /&gt;&lt;BR /&gt;Bye&lt;BR /&gt;&lt;BR /&gt;Sundar</description>
      <pubDate>Tue, 19 Jun 2001 15:09:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542251#M865707</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2001-06-19T15:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542252#M865708</link>
      <description>read NUM&lt;BR /&gt;STRING=$(awk -v NUM=$NUM '$4==NUM {print $3}' /usr/include/sys/errno.h)&lt;BR /&gt;man errno | eval sed -n '/.*${STRING}.*/,/^$/p'</description>
      <pubDate>Tue, 19 Jun 2001 15:52:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542252#M865708</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2001-06-19T15:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542253#M865709</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;  Thanks to both..&lt;BR /&gt; &lt;BR /&gt;  But sorry I have to take Ur time once more.&lt;BR /&gt;&lt;BR /&gt;  Can U please explain how sed part really &lt;BR /&gt;&lt;BR /&gt;cuts only that string from the file.&lt;BR /&gt;  &lt;BR /&gt;  Sorry I am really new to Scripting..&lt;BR /&gt;&lt;BR /&gt;  Please help me out by explaining what it does..&lt;BR /&gt;&lt;BR /&gt; Thanks &lt;BR /&gt;&lt;BR /&gt;  If possible U can leave Ur message at&lt;BR /&gt;&lt;BR /&gt;SundarHp@Hotmail.com&lt;BR /&gt;&lt;BR /&gt;  Bye and waiting&lt;BR /&gt;&lt;BR /&gt;Sundar&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Jun 2001 09:03:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542253#M865709</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2001-06-20T09:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542254#M865710</link>
      <description>Basically, the comma-separated slashes define the start and end address.&lt;BR /&gt;sed looks for a match on the 1st address, and stops looking when it matches on the 2nd address.&lt;BR /&gt;The -n says "don't print anything", the p says "output only what matches".  These two switched are invariably used together.&lt;BR /&gt;&lt;BR /&gt;Robin</description>
      <pubDate>Wed, 20 Jun 2001 11:01:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2542254#M865710</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-06-20T11:01:38Z</dc:date>
    </item>
  </channel>
</rss>

