<?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 using awk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814622#M827664</link>
    <description>I know I can do something like this "awk '/^    OmniBack II/{print $0}'"&lt;BR /&gt;&lt;BR /&gt;but I won't be to capture the "Medium verification completed, 0 errors found" message</description>
    <pubDate>Fri, 27 Sep 2002 02:33:53 GMT</pubDate>
    <dc:creator>kholikt</dc:creator>
    <dc:date>2002-09-27T02:33:53Z</dc:date>
    <item>
      <title>script using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814618#M827660</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a cronjob that run the omnimm command to scan all the media in a our autoloader automatcially.&lt;BR /&gt;&lt;BR /&gt;This is how the output will be generated.&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 09:58:39&lt;BR /&gt;        STARTING Media Agent "DDS_1"&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 09:58:40&lt;BR /&gt;        Loading medium from slot 1 to device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 09:59:19&lt;BR /&gt;        Unloading medium to slot 1 from device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 09:59:40&lt;BR /&gt;        Loading medium from slot 2 to device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 10:00:24&lt;BR /&gt;        Unloading medium to slot 2 from device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 10:00:45&lt;BR /&gt;        Loading medium from slot 3 to device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 10:01:27&lt;BR /&gt;        Unloading medium to slot 3 from device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 10:01:49&lt;BR /&gt;        Loading medium from slot 4 to device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 10:02:35&lt;BR /&gt;        Unloading medium to slot 4 from device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 10:02:56&lt;BR /&gt;        Loading medium from slot 5 to device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 10:03:39&lt;BR /&gt;        Unloading medium to slot 5 from device /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;[Warning] From: MSM@myserver "DDS_1"  Time: 09/27/02 10:04:01&lt;BR /&gt;[65:93]         Slot 6 configured as cleaning slot ==&amp;gt; skipped.&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@myserver "DDS_1"  Time: 09/27/02 10:04:01&lt;BR /&gt;        COMPLETED Media Agent "DDS_1"&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MSM@myserver "DDS_1"  Time: 09/27/02 10:04:01&lt;BR /&gt;&lt;BR /&gt;Slot [side]                Medium type     Medium Label (ID)&lt;BR /&gt;===============================================================================&lt;BR /&gt;1                          OmniBack II     ESC_TRD_ARC_FRI             &lt;BR /&gt;2                          OmniBack II     ESC_TBD_ARC_FRI             &lt;BR /&gt;3                          OmniBack II     ESC_TRA_ARC_FRI             &lt;BR /&gt;4                          cpio                                        &lt;BR /&gt;5                          tar                                         &lt;BR /&gt;6                          Cleaning tape                               &lt;BR /&gt;Final report: 5 media out of 5 successfully scanned.&lt;BR /&gt;&lt;BR /&gt;I only want the following portion.&lt;BR /&gt;&lt;BR /&gt;Slot [side]                Medium type     Medium Label (ID)&lt;BR /&gt;===============================================================================&lt;BR /&gt;1                          OmniBack II     ESC_TRD_ARC_FRI             &lt;BR /&gt;2                          OmniBack II     ESC_TBD_ARC_FRI             &lt;BR /&gt;3                          OmniBack II     ESC_TRA_ARC_FRI             &lt;BR /&gt;4                          cpio                                        &lt;BR /&gt;5                          tar                                         &lt;BR /&gt;6                          Cleaning tape                               &lt;BR /&gt;Final report: 5 media out of 5 successfully scanned.&lt;BR /&gt;&lt;BR /&gt;Although I know that I can use the tail to extract the last ten lines but it doesn't seem to be very robust.&lt;BR /&gt;&lt;BR /&gt;How could I find the pattern "Slot [side]" and print the next 6 lines?</description>
      <pubDate>Fri, 27 Sep 2002 01:40:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814618#M827660</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2002-09-27T01:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: script using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814619#M827661</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# sed -n '/^Slot/,/^Final/p' filename&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 27 Sep 2002 01:54:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814619#M827661</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-27T01:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: script using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814620#M827662</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Oh, you wanted 'awk'.  In that case:&lt;BR /&gt;&lt;BR /&gt;# awk '/^Slot/,/^Final/ {print $0}' filename&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 27 Sep 2002 01:57:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814620#M827662</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-27T01:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: script using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814621#M827663</link>
      <description>Thanks so much.&lt;BR /&gt;&lt;BR /&gt;Just wondering I have two single slot tape drive&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MSM@server1 "DDS_1_server1"  Time: 09/27/02 10:53:57&lt;BR /&gt;        OmniBack II medium "ESC_TBP_ARC_FRI" found.&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@server1 "DDS_1_server1"  Time: 09/27/02 10:52:48&lt;BR /&gt;        /dev/rmt/0m&lt;BR /&gt;        Medium verification completed, 0 errors found&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@server1 "DDS_1_server1"  Time: 09/27/02 10:52:48&lt;BR /&gt;        COMPLETED Media Agent "DDS_1_server1"&lt;BR /&gt;&lt;BR /&gt;Final report: 1 media out of 1 successfully scanned.&lt;BR /&gt;[Normal] From: MMA@server1 "DDS_2_tpsbwp"  Time: 09/27/02 10:52:49&lt;BR /&gt;        STARTING Media Agent "DDS_2_server1"&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MSM@server1 "DDS_2_server1"  Time: 09/27/02 10:53:58&lt;BR /&gt;        OmniBack II medium "ESC_PBP_ARC_FRI" found.&lt;BR /&gt;&lt;BR /&gt;[Normal] From: MMA@server1 "DDS_2_server1"  Time: 09/27/02 10:52:49&lt;BR /&gt;        /dev/rmt/3m&lt;BR /&gt;        Medium verification completed, 0 errors found&lt;BR /&gt;&lt;BR /&gt;Is that possible to also extract the output as&lt;BR /&gt;&lt;BR /&gt;DDS_1_server1&lt;BR /&gt;&lt;BR /&gt;OmniBack II medium "ESC_TBP_ARC_FRI" found.&lt;BR /&gt;Medium verification completed, 0 errors found&lt;BR /&gt;&lt;BR /&gt;DDS_2_server2&lt;BR /&gt;OmniBack II medium "ESC_PBP_ARC_FRI" found.&lt;BR /&gt;Medium verification completed, 0 errors found</description>
      <pubDate>Fri, 27 Sep 2002 02:27:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814621#M827663</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2002-09-27T02:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: script using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814622#M827664</link>
      <description>I know I can do something like this "awk '/^    OmniBack II/{print $0}'"&lt;BR /&gt;&lt;BR /&gt;but I won't be to capture the "Medium verification completed, 0 errors found" message</description>
      <pubDate>Fri, 27 Sep 2002 02:33:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814622#M827664</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2002-09-27T02:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: script using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814623#M827665</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Something like:&lt;BR /&gt;&lt;BR /&gt;awk '/From/{drive=$4}&lt;BR /&gt;/OmniBack/{gsub("\"","",drive);print drive;print}&lt;BR /&gt;/verification/{print;print ""}' filename&lt;BR /&gt;&lt;BR /&gt;should do it.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin</description>
      <pubDate>Fri, 27 Sep 2002 06:00:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-using-awk/m-p/2814623#M827665</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-09-27T06:00:37Z</dc:date>
    </item>
  </channel>
</rss>

