<?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/3269058#M889296</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The below script should help you.&lt;BR /&gt;&lt;BR /&gt;POOL=$(omnimm -media_info $RESULT | awk -F ":" '/Pool name/{print $2}')&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To check by commandline.&lt;BR /&gt;omnimm -media_info omniback_1 -detail|awk -F ":" '/Pool name/{print $2}'&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 06 May 2004 01:07:36 GMT</pubDate>
    <dc:creator>V.Tamilvanan</dc:creator>
    <dc:date>2004-05-06T01:07:36Z</dc:date>
    <item>
      <title>script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269056#M889294</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am writing a script to check the quality of the media in my omniback.&lt;BR /&gt;&lt;BR /&gt;POOL=$(omnimm -media_info $RESULT | awk 'NR &amp;gt; 3 {print $3}')&lt;BR /&gt;QUALITY=$(omnimm -list_pool $POOL | grep -i $RESULT | awk '{print $1}')&lt;BR /&gt;&lt;BR /&gt;However due to the length of my media pool, I won't be able to get the correct output.&lt;BR /&gt;&lt;BR /&gt;For example, same media due to the column width problem _DDS was cut off.  If I use "-detail" option I find it difficult to grep out the media pool name.&lt;BR /&gt;&lt;BR /&gt;omnimm -media_info ESC_PBP_ARC_THU -detail&lt;BR /&gt;&lt;BR /&gt;MediumID        : ac1e1e1c:3d0d5c27:6672:0001 &lt;BR /&gt;        Pool name               : PBP_SAP_Archive_DDS &lt;BR /&gt;        Library                 :  &lt;BR /&gt;        Medium Label            : ESC_PBP_ARC_THU &lt;BR /&gt;        Location                :  &lt;BR /&gt;        Used blocks             : 309824 &lt;BR /&gt;        Total blocks            : 40960000 &lt;BR /&gt;        Number of writes        : 2 &lt;BR /&gt;        Number of overwrites    : 85 &lt;BR /&gt;        Number of errors        : 0 &lt;BR /&gt;        Creation time           : Mon Jun 17 11:48:55 2002 &lt;BR /&gt;        Time of last write      : Thu May  6 11:31:20 2004 &lt;BR /&gt;        Time of last overwrite  : Thu May  6 11:30:19 2004 &lt;BR /&gt;        Time of last access     : Thu May  6 12:47:20 2004 &lt;BR /&gt;        Medium type             : HASNOCOPY &lt;BR /&gt; &lt;BR /&gt;omnimm -media_info ESC_PBP_ARC_THU        &lt;BR /&gt;&lt;BR /&gt;Medium Label                 Medium ID                 Pool           Library&lt;BR /&gt;===============================================================================&lt;BR /&gt;ESC_PBP_ARC_THU       ac1e1e1c:3d0d5c27:6672:0001      PBP_SAP_Archive     &lt;BR /&gt;</description>
      <pubDate>Thu, 06 May 2004 00:29:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269056#M889294</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2004-05-06T00:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269057#M889295</link>
      <description>&lt;BR /&gt;using perl this would look something like:&lt;BR /&gt;(untested!)&lt;BR /&gt;&lt;BR /&gt;perl media-check.pl $RESULT&lt;BR /&gt;&lt;BR /&gt;where media-check.pl would be&lt;BR /&gt;-----&lt;BR /&gt;$result = shift or die "please specify result";&lt;BR /&gt;foreach $_ (`omnimm -media_info $result -detail`) {&lt;BR /&gt; if (/^Poolname:(\w+)/) {&lt;BR /&gt;   $pool = $1;&lt;BR /&gt;   last;&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;foreach $_ (`omnimm -list_pool $pool`){&lt;BR /&gt; if (/$result/i) {&lt;BR /&gt;  @words=split;&lt;BR /&gt;  print "$words[0]\n";&lt;BR /&gt;  last;&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;-----&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.</description>
      <pubDate>Thu, 06 May 2004 01:03:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269057#M889295</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-05-06T01:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269058#M889296</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The below script should help you.&lt;BR /&gt;&lt;BR /&gt;POOL=$(omnimm -media_info $RESULT | awk -F ":" '/Pool name/{print $2}')&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To check by commandline.&lt;BR /&gt;omnimm -media_info omniback_1 -detail|awk -F ":" '/Pool name/{print $2}'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 May 2004 01:07:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269058#M889296</guid>
      <dc:creator>V.Tamilvanan</dc:creator>
      <dc:date>2004-05-06T01:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269059#M889297</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;It work but it put one more space character in the front</description>
      <pubDate>Thu, 06 May 2004 02:05:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269059#M889297</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2004-05-06T02:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269060#M889298</link>
      <description>trya to parse the output of omnirpt command:&lt;BR /&gt;&lt;BR /&gt;omnirpt -tab -ascii -report media_list</description>
      <pubDate>Thu, 06 May 2004 05:09:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269060#M889298</guid>
      <dc:creator>Jdamian</dc:creator>
      <dc:date>2004-05-06T05:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269061#M889299</link>
      <description>&lt;BR /&gt;&amp;gt; It work but it put one more space character in the front &lt;BR /&gt;&lt;BR /&gt;That's proably because it is hard to judge in the forum listing whether there are supposed to be spaces around the ":" on the -detail report lines or not. If there are spaces, then you do not need ":" as seperator and the example from Tamil becomes:&lt;BR /&gt;&lt;BR /&gt;POOL=$(omnimm -media_info $RESULT | awk '/^Pool/{print $4}')&lt;BR /&gt;&lt;BR /&gt;THis looks for a line beginning with (^) "Pool" and prints the 4th field. The first field would be "pool", the second "name", the 3th ":" and the name itself #4&lt;BR /&gt;&lt;BR /&gt;Because the name is the last field you can also not worry about coutnign fields yoursef and use: &lt;BR /&gt;&lt;BR /&gt;POOL=$(omnimm -media_info $RESULT | awk '/^Pool/{print $NF}')&lt;BR /&gt;&lt;BR /&gt;NF = number of fields&lt;BR /&gt;</description>
      <pubDate>Thu, 06 May 2004 09:03:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3269061#M889299</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-05-06T09:03:31Z</dc:date>
    </item>
  </channel>
</rss>

