<?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/2592632#M925221</link>
    <description>Hopefully, I understood your question now.&lt;BR /&gt;&lt;BR /&gt;Try this.&lt;BR /&gt;&lt;BR /&gt;data=`echo $test|sed 's/^.*ryl/ryl/'` |awk "{print $1}'&lt;BR /&gt;&lt;BR /&gt;if you want the entire text after ryl.., take out the awk statement.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
    <pubDate>Wed, 10 Oct 2001 18:05:50 GMT</pubDate>
    <dc:creator>Sridhar Bhaskarla</dc:creator>
    <dc:date>2001-10-10T18:05:50Z</dc:date>
    <item>
      <title>script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592623#M925212</link>
      <description>Does anybody have any example of how to parse text by pattern using awk, sed, or grep.  I have tried every combination of script that I can think of.&lt;BR /&gt;&lt;BR /&gt;Here is my latest attempt:&lt;BR /&gt;test="abcd aa abc : rylfrer01 (xxx.xx.x.xxx) unreachable."&lt;BR /&gt;&lt;BR /&gt;In my script i am trying the following&lt;BR /&gt;&lt;BR /&gt;data=`echo "$test"|sed 's/.*(\: .*\ ).*/\1/'`&lt;BR /&gt;echo "$data"&lt;BR /&gt;&lt;BR /&gt;I was hoping this would give me the text rylfrer01&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 10 Oct 2001 16:49:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592623#M925212</guid>
      <dc:creator>Jeff Paciolla_1</dc:creator>
      <dc:date>2001-10-10T16:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592624#M925213</link>
      <description>What is it you're trying accomplish?</description>
      <pubDate>Wed, 10 Oct 2001 16:59:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592624#M925213</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2001-10-10T16:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592625#M925214</link>
      <description>If the example given is the format of your input, then it's easy. Did you try this?&lt;BR /&gt;&lt;BR /&gt;date=`echo $test|awk'{FS=":";print $2}' |awk '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;This will give you rfylfer01.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Wed, 10 Oct 2001 17:03:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592625#M925214</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-10-10T17:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592626#M925215</link>
      <description>Ooops... it's not date..it's data. Replace your sed statement with the statement I gave&lt;BR /&gt;by replacing date with data.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Wed, 10 Oct 2001 17:05:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592626#M925215</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-10-10T17:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592627#M925216</link>
      <description>Hi Jeff:&lt;BR /&gt;&lt;BR /&gt;# echo $test|awk '{print $5}'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 10 Oct 2001 17:07:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592627#M925216</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-10-10T17:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592628#M925217</link>
      <description>Patrick - What I am trying to get is the text that starts with "ryl*" from the test message.  My dilemma is that the pattern text "ryl*" does not always appear in the same location within the message.  So in my script I am trying to parse the ryl* text no matter when or where it appears in the message, and assign that to a different variable.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 10 Oct 2001 17:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592628#M925217</guid>
      <dc:creator>Jeff Paciolla_1</dc:creator>
      <dc:date>2001-10-10T17:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592629#M925218</link>
      <description>Okay Jeff, here's my cut at it in awk but it's not real pretty but it will find the ryl string:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TEST="abcd aa abc: rylfrer01 (xxx.xx.x.xxxx) unreachable"&lt;BR /&gt;&lt;BR /&gt;echo ${TEST} | awk '{n = split($0,arry," "); if (n &amp;gt; 0) { i = 1; while (i &amp;lt;= n) {if (match(arry[i],/ryl/) &amp;gt; 0) {printf("%s\n",arry[i])}; ++i }}}' &lt;BR /&gt; &lt;BR /&gt;Clay</description>
      <pubDate>Wed, 10 Oct 2001 17:31:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592629#M925218</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-10-10T17:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592630#M925219</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;how about plain ol' "cut"?&lt;BR /&gt;&lt;BR /&gt;echo $Test | cut -d':' -f2 | cut -d'(' -f1&lt;BR /&gt;&lt;BR /&gt;Just my ?0.02,&lt;BR /&gt;Wodisch</description>
      <pubDate>Wed, 10 Oct 2001 17:44:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592630#M925219</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2001-10-10T17:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592631#M925220</link>
      <description>Thanks Clay - This seems to work perfectly&lt;BR /&gt;&lt;BR /&gt;Jeff&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Oct 2001 17:55:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592631#M925220</guid>
      <dc:creator>Jeff Paciolla_1</dc:creator>
      <dc:date>2001-10-10T17:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592632#M925221</link>
      <description>Hopefully, I understood your question now.&lt;BR /&gt;&lt;BR /&gt;Try this.&lt;BR /&gt;&lt;BR /&gt;data=`echo $test|sed 's/^.*ryl/ryl/'` |awk "{print $1}'&lt;BR /&gt;&lt;BR /&gt;if you want the entire text after ryl.., take out the awk statement.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Wed, 10 Oct 2001 18:05:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592632#M925221</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-10-10T18:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592633#M925222</link>
      <description>echo "$test" | sed 's/.*\(rly.*\)[[:space:]].*/\1/'</description>
      <pubDate>Wed, 10 Oct 2001 19:28:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2592633#M925222</guid>
      <dc:creator>Curtis Larson_1</dc:creator>
      <dc:date>2001-10-10T19:28:10Z</dc:date>
    </item>
  </channel>
</rss>

