<?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 Variable parse in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267340#M655508</link>
    <description>Hi &lt;BR /&gt;&lt;BR /&gt;I have this incoming for a grep command.&lt;BR /&gt;AAA=1&lt;BR /&gt;BBB=1&lt;BR /&gt;CCC=2&lt;BR /&gt;DDD=533&lt;BR /&gt;EEE=991&lt;BR /&gt;&lt;BR /&gt;Question: How to exploit the parse to call a function with the value after the '=' operator. &lt;BR /&gt;func(1)&lt;BR /&gt;func(1)&lt;BR /&gt;func(2)&lt;BR /&gt;func(553)&lt;BR /&gt;func(991)&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bests Regards&lt;BR /&gt;Den&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 21 Dec 2010 15:38:54 GMT</pubDate>
    <dc:creator>Leo The Cat</dc:creator>
    <dc:date>2010-12-21T15:38:54Z</dc:date>
    <item>
      <title>Variable parse</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267340#M655508</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I have this incoming for a grep command.&lt;BR /&gt;AAA=1&lt;BR /&gt;BBB=1&lt;BR /&gt;CCC=2&lt;BR /&gt;DDD=533&lt;BR /&gt;EEE=991&lt;BR /&gt;&lt;BR /&gt;Question: How to exploit the parse to call a function with the value after the '=' operator. &lt;BR /&gt;func(1)&lt;BR /&gt;func(1)&lt;BR /&gt;func(2)&lt;BR /&gt;func(553)&lt;BR /&gt;func(991)&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bests Regards&lt;BR /&gt;Den&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Dec 2010 15:38:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267340#M655508</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2010-12-21T15:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Variable parse</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267341#M655509</link>
      <description>Hi Den:&lt;BR /&gt;&lt;BR /&gt;Why not something like:&lt;BR /&gt;&lt;BR /&gt;# awk -F= '{system("echo "$2)}' file&lt;BR /&gt;&lt;BR /&gt;...where 'echo' is your function.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 21 Dec 2010 15:55:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267341#M655509</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-12-21T15:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Variable parse</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267342#M655510</link>
      <description>Hi James&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It's because my function is in my ksh&lt;BR /&gt;&lt;BR /&gt;function testentry {&lt;BR /&gt;  &lt;BR /&gt;  echo "in"&lt;BR /&gt;  echo $1&lt;BR /&gt;  ...  &lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;awk -FSERVICE= '{system("testentry "$2)}' /su02/automationlogs/009/odb_SrvLoop_RetrieveServiceNames.log&lt;BR /&gt;&lt;BR /&gt;The run has errors like this:&lt;BR /&gt;&lt;BR /&gt;Global TnsNames.ora check&lt;BR /&gt;Tue Dec 21 11:30:02 EST 2010&lt;BR /&gt;&lt;BR /&gt;Check is running from  stha2a034&lt;BR /&gt;&lt;BR /&gt;__ stha24041 __&lt;BR /&gt;stha24041::HCMVNL2    ===== &amp;gt; INFO:: Undeterminated database version.&lt;BR /&gt;stha24041::HCMVNL2    ===== &amp;gt; INFO:: Database seems to be unreachable, bypassed.&lt;BR /&gt;stha24041::NIKDEV    ===== &amp;gt; INFO:: Datebase is not define in /etc/oratab.&lt;BR /&gt;&amp;lt; End of check for stha24041&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;sh: testentry:  not found.&lt;BR /&gt;&lt;BR /&gt;Bests Regards&lt;BR /&gt;Den&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Dec 2010 16:33:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267342#M655510</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2010-12-21T16:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Variable parse</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267343#M655511</link>
      <description>Hi (again) Den:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; t's because my function is in my ksh&lt;BR /&gt;&lt;BR /&gt;OK, consider something like this:&lt;BR /&gt;&lt;BR /&gt;# cat ./myparse&lt;BR /&gt;!/bin/sh&lt;BR /&gt;MYINPUT=$@&lt;BR /&gt;function MYFUNC&lt;BR /&gt;{&lt;BR /&gt;    echo "I see $@"&lt;BR /&gt;}&lt;BR /&gt;for VAR in ${MYINPUT}&lt;BR /&gt;do&lt;BR /&gt;    VAL=$(echo ${VAR} | cut -d"=" -f2)&lt;BR /&gt;    MYFUNC ${VAL}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;You could do:&lt;BR /&gt;&lt;BR /&gt;# ./myparse a=1 b=2 c=3&lt;BR /&gt;&lt;BR /&gt;# ./myparse $(&amp;lt; inputfile)&lt;BR /&gt;&lt;BR /&gt;# ./myparse $(grep "=" inputfile)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Dec 2010 16:51:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267343#M655511</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-12-21T16:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Variable parse</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267344#M655512</link>
      <description>The Last post-solution makes the job. Thanks James!</description>
      <pubDate>Tue, 21 Dec 2010 17:56:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-parse/m-p/5267344#M655512</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2010-12-21T17:56:17Z</dc:date>
    </item>
  </channel>
</rss>

