<?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: problem with parser in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213529#M685852</link>
    <description>&amp;gt;but takes a lot of time for my big files..&lt;BR /&gt;&amp;gt;for file in $(&amp;lt; file2); do grep $file file1&lt;BR /&gt;&lt;BR /&gt;You can do it in one shot:&lt;BR /&gt;fgrep -f file2 file1&lt;BR /&gt;&lt;BR /&gt;This works if the strings in file2 don't appear in other columns of your data.  If they do, you may have to add a "^" (and use grep) at the beginning of each line in file2.</description>
    <pubDate>Tue, 10 Jun 2008 08:42:50 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-06-10T08:42:50Z</dc:date>
    <item>
      <title>problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213524#M685847</link>
      <description>Hello..can anyone give me a clue how to get desired output:&lt;BR /&gt;&lt;BR /&gt;file1:&lt;BR /&gt;&lt;BR /&gt;5555:56:00 789 A&lt;BR /&gt;3345:56:18 189 B&lt;BR /&gt;1245:56:38 389 A&lt;BR /&gt;0045:56:58 689 S&lt;BR /&gt;0045:55:51 000 Q&lt;BR /&gt;1245:56:44 989 E&lt;BR /&gt;2245:56:11 089 E&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;file2&lt;BR /&gt;1245&lt;BR /&gt;0045&lt;BR /&gt;&lt;BR /&gt;output:&lt;BR /&gt;&lt;BR /&gt;1245:56:38 389 A&lt;BR /&gt;0045:56:58 689 S&lt;BR /&gt;0045:55:51 000 Q&lt;BR /&gt;&lt;BR /&gt;I tryed something with comm and join command but I mess myself..&lt;BR /&gt;&lt;BR /&gt;thank you guys</description>
      <pubDate>Tue, 10 Jun 2008 07:03:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213524#M685847</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2008-06-10T07:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213525#M685848</link>
      <description>sorry output should be:&lt;BR /&gt;&lt;BR /&gt;output:&lt;BR /&gt;&lt;BR /&gt;1245:56:38 389 A&lt;BR /&gt;0045:56:58 689 S&lt;BR /&gt;0045:55:51 000 Q&lt;BR /&gt;1245:56:44 989 E&lt;BR /&gt;&lt;BR /&gt;I forgot last line :)</description>
      <pubDate>Tue, 10 Jun 2008 07:05:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213525#M685848</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2008-06-10T07:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213526#M685849</link>
      <description>again me...&lt;BR /&gt;&lt;BR /&gt;I could do it this way...but takes a lot of time for my big files..&lt;BR /&gt;&lt;BR /&gt;for file in $(&amp;lt; file2); do&lt;BR /&gt;&lt;BR /&gt;        grep $file file1 &amp;gt;&amp;gt; myoutout&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;any quicker way?</description>
      <pubDate>Tue, 10 Jun 2008 07:18:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213526#M685849</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2008-06-10T07:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213527#M685850</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Hope it helps:&lt;BR /&gt;&lt;BR /&gt;awk '{system("grep "$0" file1")}' file2&lt;BR /&gt;&lt;BR /&gt;Kenan.</description>
      <pubDate>Tue, 10 Jun 2008 07:23:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213527#M685850</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2008-06-10T07:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213528#M685851</link>
      <description>kind of stupid...I put solutions for my problem..hahaah :))))&lt;BR /&gt;&lt;BR /&gt;anyways anyone knows better way to optimise this:&lt;BR /&gt;&lt;BR /&gt;join -1 1 -2 1 -t':' -o 2.1,2.2,2.3   file2 file1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks everyone.</description>
      <pubDate>Tue, 10 Jun 2008 08:37:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213528#M685851</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2008-06-10T08:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213529#M685852</link>
      <description>&amp;gt;but takes a lot of time for my big files..&lt;BR /&gt;&amp;gt;for file in $(&amp;lt; file2); do grep $file file1&lt;BR /&gt;&lt;BR /&gt;You can do it in one shot:&lt;BR /&gt;fgrep -f file2 file1&lt;BR /&gt;&lt;BR /&gt;This works if the strings in file2 don't appear in other columns of your data.  If they do, you may have to add a "^" (and use grep) at the beginning of each line in file2.</description>
      <pubDate>Tue, 10 Jun 2008 08:42:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213529#M685852</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-06-10T08:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213530#M685853</link>
      <description>&amp;gt;I put solutions for my problem. hahaah :))))&lt;BR /&gt;&lt;BR /&gt;Or you're telling us how to not do it.  ;-)</description>
      <pubDate>Tue, 10 Jun 2008 08:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213530#M685853</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-06-10T08:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213531#M685854</link>
      <description>kind of..:)&lt;BR /&gt;&lt;BR /&gt;thank U very very much</description>
      <pubDate>Tue, 10 Jun 2008 09:45:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213531#M685854</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2008-06-10T09:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem with parser</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213532#M685855</link>
      <description>Here is an other way to do it:&lt;BR /&gt;&lt;BR /&gt;$ awk 'BEGIN{while (getline line&amp;lt;"file2"){file2[line]=1}}  file2[substr($0,1,4)]' file1&lt;BR /&gt;1245:56:38 389 A&lt;BR /&gt;0045:56:58 689 S&lt;BR /&gt;0045:55:51 000 Q&lt;BR /&gt;1245:56:44 989 E&lt;BR /&gt;&lt;BR /&gt;In the BEGIN section we read "file2" and set an array element with the key being the entire line to be true.&lt;BR /&gt;&lt;BR /&gt;The main section consists of just a test for the array element in file2 identified by the first 4 characters in each line.&lt;BR /&gt;&lt;BR /&gt;awk beginners might write that 'main' part as: &lt;BR /&gt;{ key = substr($0,1,4); if (file2[key]==1) { print } }&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Jun 2008 10:52:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-parser/m-p/4213532#M685855</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-06-10T10:52:02Z</dc:date>
    </item>
  </channel>
</rss>

