<?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: parse output from the following in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777605#M640853</link>
    <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Actually, in the spirit of conservation of needless processes (even in pipes), you could do:&lt;BR /&gt;&lt;BR /&gt;# ./myfilter&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;typeset FILE=$1&lt;BR /&gt;awk '&lt;BR /&gt;/Pseudo/ {split($0,a,"=");gsub(/[^ 0-9]*/,"",a[2]);printf "%s",a[2]}&lt;BR /&gt;/Logica/ {split($0,a,"=");gsub(/[^ 0-9]*/,"",a[2]);printf " %s\n",a[2]}&lt;BR /&gt;' ${FILE}&lt;BR /&gt;&lt;BR /&gt;...that is, let 'awk' due all the work it is designed to do :-)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Thu, 14 Apr 2011 13:23:27 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2011-04-14T13:23:27Z</dc:date>
    <item>
      <title>parse output from the following</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777602#M640850</link>
      <description>I have the following command output and I need to find a way that I can extract the Pseudo name and Logical device ID.&lt;BR /&gt;&lt;BR /&gt;Pseudo name=emcpower259a&lt;BR /&gt;Logical device ID=0113&lt;BR /&gt;state=alive; policy=SymmOpt; priority=0; queued-IOs=0&lt;BR /&gt;==============================================================================&lt;BR /&gt;---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---&lt;BR /&gt;###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors&lt;BR /&gt;==============================================================================&lt;BR /&gt;3075 pci@8,600000/SUNW,qlc@1/fp@0,0 c2t5006048C53688940d132s0 FA  1cA   active  alive      0      0&lt;BR /&gt;3072 pci@8,600000/SUNW,qlc@2/fp@0,0 c3t5006048C5368894Fd132s0 FA 16cA   active  alive      0      0&lt;BR /&gt;&lt;BR /&gt;Pseudo name=emcpower255a&lt;BR /&gt;Logical device ID=0117&lt;BR /&gt;state=alive; policy=SymmOpt; priority=0; queued-IOs=0&lt;BR /&gt;==============================================================================&lt;BR /&gt;---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---&lt;BR /&gt;###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors&lt;BR /&gt;==============================================================================&lt;BR /&gt;3075 pci@8,600000/SUNW,qlc@1/fp@0,0 c2t5006048C53688940d133s0 FA  1cA   active  alive      0      0&lt;BR /&gt;3072 pci@8,600000/SUNW,qlc@2/fp@0,0 c3t5006048C5368894Fd133s0 FA 16cA   active  alive      0      0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The output from the above will give just two column, first is the pseudo name and second is a logical device id&lt;BR /&gt;&lt;BR /&gt;for example, the output from the above will be&lt;BR /&gt;&lt;BR /&gt;259   0113&lt;BR /&gt;255   0117&lt;BR /&gt;&lt;BR /&gt;notice that it also strip off the emcpowerxxxa from it too.  Look like there is no simple way to do this in a shell script</description>
      <pubDate>Thu, 14 Apr 2011 12:47:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777602#M640850</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2011-04-14T12:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: parse output from the following</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777603#M640851</link>
      <description>cat output|grep "Pseudo name" | cut -d"=" -f2 | sed -e "/emcpower/s/emcpower//"&lt;BR /&gt;&lt;BR /&gt;This should give you 259a and 255a from the output above&lt;BR /&gt;&lt;BR /&gt;cat output | grep "Logical device" |cut -d"=" -f2&lt;BR /&gt;&lt;BR /&gt;output of the above should give you 0113 and 0117 &lt;BR /&gt;&lt;BR /&gt;Am I missing something ?</description>
      <pubDate>Thu, 14 Apr 2011 12:54:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777603#M640851</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2011-04-14T12:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: parse output from the following</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777604#M640852</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;One quick way:&lt;BR /&gt;&lt;BR /&gt;# cat ./myfilter&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;typeset FILE=$1&lt;BR /&gt;awk '&lt;BR /&gt;/Pseudo/ {split($0,a,"=");printf "%s", a[2]}&lt;BR /&gt;/Logica/ {split($0,a,"=");printf " %s\n", a[2]}&lt;BR /&gt;' ${FILE} | sed -e 's/[^ 0-9]*//g'&lt;BR /&gt;&lt;BR /&gt;...using your input:&lt;BR /&gt;&lt;BR /&gt;# ./myfilter myfile&lt;BR /&gt;259 0113&lt;BR /&gt;255 0117&lt;BR /&gt;&lt;BR /&gt;...or:&lt;BR /&gt;&lt;BR /&gt;# &lt;COMMAND&gt; | ./myfilter&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;./myfile&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Thu, 14 Apr 2011 13:07:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777604#M640852</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-04-14T13:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: parse output from the following</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777605#M640853</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Actually, in the spirit of conservation of needless processes (even in pipes), you could do:&lt;BR /&gt;&lt;BR /&gt;# ./myfilter&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;typeset FILE=$1&lt;BR /&gt;awk '&lt;BR /&gt;/Pseudo/ {split($0,a,"=");gsub(/[^ 0-9]*/,"",a[2]);printf "%s",a[2]}&lt;BR /&gt;/Logica/ {split($0,a,"=");gsub(/[^ 0-9]*/,"",a[2]);printf " %s\n",a[2]}&lt;BR /&gt;' ${FILE}&lt;BR /&gt;&lt;BR /&gt;...that is, let 'awk' due all the work it is designed to do :-)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 14 Apr 2011 13:23:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777605#M640853</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-04-14T13:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: parse output from the following</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777606#M640854</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Are you satisfied with the help that you have received?&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 18 Apr 2011 11:14:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/parse-output-from-the-following/m-p/4777606#M640854</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-04-18T11:14:57Z</dc:date>
    </item>
  </channel>
</rss>

