<?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: scripting question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741063#M946818</link>
    <description>Or in a shell:&lt;BR /&gt;&lt;BR /&gt;cat DATA | tr -cs "[:alnum:][:punct:]" "[\012*]" | grep XY&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
    <pubDate>Mon, 10 Jun 2002 13:52:36 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2002-06-10T13:52:36Z</dc:date>
    <item>
      <title>scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741057#M946812</link>
      <description>How do I extract a particular pattern followed by few charaters. I have have a very large data file. There are few line containg a typical pattern I just want to extract it.&lt;BR /&gt;&lt;BR /&gt;The pattern is randomly placed in the file,but has a common 1st two chars. followed by 8 diff. chars.&lt;BR /&gt;&lt;BR /&gt;eg.&lt;BR /&gt;INPUT DATA&lt;BR /&gt;This is a test data XYxxxxxxxx&lt;BR /&gt;Data XYmmmmm_mm could be any where in the file&lt;BR /&gt;Need to only extract XYaaaaaaaa&lt;BR /&gt;&lt;BR /&gt;OUTPUT &lt;BR /&gt;&lt;BR /&gt;XYxxxxxxxx&lt;BR /&gt;XYmmmmm_mm&lt;BR /&gt;XYaaaaaaaa&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;Is it possible to do this ?? Please help I am brain dead ... can't think of anything..really.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jun 2002 12:44:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741057#M946812</guid>
      <dc:creator>John McDen</dc:creator>
      <dc:date>2002-06-10T12:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741058#M946813</link>
      <description>A simple perl program can do it&lt;BR /&gt;&lt;BR /&gt;open(INP,"&lt;YOURFILE&gt;&lt;/YOURFILE&gt;while(&lt;INP&gt;) {&lt;BR /&gt; chomp;&lt;BR /&gt; while (/(XY[^\s]*)/g) {&lt;BR /&gt;  print $1,"\n";&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;&lt;/INP&gt;</description>
      <pubDate>Mon, 10 Jun 2002 12:54:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741058#M946813</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-06-10T12:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741059#M946814</link>
      <description>Rodney thanks for replying so fast it works but I just need the XY and next 8 chars I wish I knew perl so that I could fix it on my own.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jun 2002 13:20:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741059#M946814</guid>
      <dc:creator>John McDen</dc:creator>
      <dc:date>2002-06-10T13:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741060#M946815</link>
      <description>Just change&lt;BR /&gt;&lt;BR /&gt;while (/(XY[^\s]*)/g) { &lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;while (/(XY........)/g) {&lt;BR /&gt;&lt;BR /&gt;In your sample, you had a value with _mm appended which made it more than 8 characters  so I wasn't sure if you needed the characters up to the next blank character or end of line.&lt;BR /&gt;&lt;BR /&gt;Good Luck&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 10 Jun 2002 13:23:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741060#M946815</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-06-10T13:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741061#M946816</link>
      <description>Oops, recounting I see it was 8 characters. These variable width fonts can be misleading at times.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 10 Jun 2002 13:27:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741061#M946816</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-06-10T13:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741062#M946817</link>
      <description>Great .. it worked... Thanks</description>
      <pubDate>Mon, 10 Jun 2002 13:28:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741062#M946817</guid>
      <dc:creator>John McDen</dc:creator>
      <dc:date>2002-06-10T13:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741063#M946818</link>
      <description>Or in a shell:&lt;BR /&gt;&lt;BR /&gt;cat DATA | tr -cs "[:alnum:][:punct:]" "[\012*]" | grep XY&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 10 Jun 2002 13:52:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741063#M946818</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-06-10T13:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741064#M946819</link>
      <description>perl -ne 'print "$1\n" if /\b(XY\w{8})/' /path/to/your/file</description>
      <pubDate>Mon, 10 Jun 2002 13:52:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741064#M946819</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2002-06-10T13:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741065#M946820</link>
      <description>Ralph, I believe your version assumes only one per line. The version I supplied allows for multiple entries to exist on a line.&lt;BR /&gt;&lt;BR /&gt;See documentation on m//g. "g" allows to search multiple times through the same line.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 10 Jun 2002 13:57:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741065#M946820</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-06-10T13:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741066#M946821</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;This will hit those "words" starting with XY with only a length of eight:&lt;BR /&gt;&lt;BR /&gt;cat DATA | tr -cs "[:alnum:][:punct:]" "[\012*]" | grep "^XY\(.\)\{8\}$"&lt;BR /&gt;&lt;BR /&gt;ignoring anything like XYabcdefghijk&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 10 Jun 2002 14:03:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741066#M946821</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-06-10T14:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741067#M946822</link>
      <description>Thanks guys Rodney's solution was perfect...I really appreciate everybody help ..</description>
      <pubDate>Mon, 10 Jun 2002 14:11:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741067#M946822</guid>
      <dc:creator>John McDen</dc:creator>
      <dc:date>2002-06-10T14:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741068#M946823</link>
      <description>Rodney is going to steal my perl answers? :]}&lt;BR /&gt;&lt;BR /&gt;N/A&lt;BR /&gt;&lt;BR /&gt;Personally I thing Ralph's ansewr is better</description>
      <pubDate>Mon, 10 Jun 2002 14:24:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/2741068#M946823</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-06-10T14:24:34Z</dc:date>
    </item>
  </channel>
</rss>

