<?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: mulit line pattern? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903700#M936124</link>
    <description>Hi Jack,&lt;BR /&gt;&lt;BR /&gt;Here's a perl script to "grep" with continuation characters:&lt;BR /&gt;&lt;BR /&gt;===============&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;$string=shift;&lt;BR /&gt;open FH,shift;&lt;BR /&gt;while (defined($line=&lt;FH&gt;)){&lt;BR /&gt; chomp $line;&lt;BR /&gt; if ($line=~s/\\\s*$//){&lt;BR /&gt;  $line.=&lt;FH&gt;;&lt;BR /&gt;  redo unless eof(FH);&lt;BR /&gt; }&lt;BR /&gt; print "$line\n" if ($line=~/$string/);&lt;BR /&gt;}&lt;BR /&gt;================&lt;BR /&gt;&lt;BR /&gt;so to run it:&lt;BR /&gt;&lt;BR /&gt;% scriptname searchstring filename&lt;BR /&gt;&lt;BR /&gt;rgds, Robin&lt;/FH&gt;&lt;/FH&gt;</description>
    <pubDate>Fri, 14 Feb 2003 09:39:31 GMT</pubDate>
    <dc:creator>Robin Wakefield</dc:creator>
    <dc:date>2003-02-14T09:39:31Z</dc:date>
    <item>
      <title>mulit line pattern?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903693#M936117</link>
      <description>Hi,guys&lt;BR /&gt;&lt;BR /&gt;I need extract the complete line from the file as below: (example.dat)&lt;BR /&gt;...&lt;BR /&gt;abc=123 456 FFF     789 HHH     000 KKK &lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Only the "abc=123 456 FFF \" could be gotten with " grep abe example.dat" but the rest part were lost.&lt;BR /&gt;&lt;BR /&gt;Could we use the normal script to handle such cases?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Jack</description>
      <pubDate>Thu, 13 Feb 2003 12:12:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903693#M936117</guid>
      <dc:creator>Jack_27</dc:creator>
      <dc:date>2003-02-13T12:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: mulit line pattern?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903694#M936118</link>
      <description>Notice:&lt;BR /&gt;The "FFF" and "HHH" were followed by the "\" character.</description>
      <pubDate>Thu, 13 Feb 2003 12:15:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903694#M936118</guid>
      <dc:creator>Jack_27</dc:creator>
      <dc:date>2003-02-13T12:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: mulit line pattern?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903695#M936119</link>
      <description>Can you try "cat -v example.dat | grep abc" ?&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Feb 2003 12:25:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903695#M936119</guid>
      <dc:creator>LE_1</dc:creator>
      <dc:date>2003-02-13T12:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: mulit line pattern?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903696#M936120</link>
      <description>Hi,LE&lt;BR /&gt;&lt;BR /&gt;It does't work well.</description>
      <pubDate>Thu, 13 Feb 2003 13:16:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903696#M936120</guid>
      <dc:creator>Jack_27</dc:creator>
      <dc:date>2003-02-13T13:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: mulit line pattern?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903697#M936121</link>
      <description>Hi Jack,&lt;BR /&gt;&lt;BR /&gt;Can you attach the file - not sure what you mean by the "\" character, as that should grep with no problems.&lt;BR /&gt;&lt;BR /&gt;rgds, Robin</description>
      <pubDate>Thu, 13 Feb 2003 13:21:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903697#M936121</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2003-02-13T13:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: mulit line pattern?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903698#M936122</link>
      <description>Hi, Jack&lt;BR /&gt;I have found a solution something "twisted"&lt;BR /&gt;&lt;BR /&gt;Issue the command:&lt;BR /&gt;awk -f script.awk example.dat&lt;BR /&gt;&lt;BR /&gt;I have attached the file script.awk.&lt;BR /&gt;&lt;BR /&gt;hope this helps.&lt;BR /&gt;Frank.</description>
      <pubDate>Thu, 13 Feb 2003 16:59:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903698#M936122</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2003-02-13T16:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: mulit line pattern?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903699#M936123</link>
      <description>Hi,Frank&lt;BR /&gt;&lt;BR /&gt;Wonderful!The awk script you provided works well.&lt;BR /&gt;The output was :&lt;BR /&gt;abc 123 456 FFF         789 HHH         000 KKK         UUU&lt;BR /&gt;&lt;BR /&gt;Robin,&lt;BR /&gt;I've attached the example.dat and please review it.&lt;BR /&gt;&lt;BR /&gt;Thank all of you!&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Jack&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Feb 2003 04:43:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903699#M936123</guid>
      <dc:creator>Jack_27</dc:creator>
      <dc:date>2003-02-14T04:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: mulit line pattern?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903700#M936124</link>
      <description>Hi Jack,&lt;BR /&gt;&lt;BR /&gt;Here's a perl script to "grep" with continuation characters:&lt;BR /&gt;&lt;BR /&gt;===============&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;$string=shift;&lt;BR /&gt;open FH,shift;&lt;BR /&gt;while (defined($line=&lt;FH&gt;)){&lt;BR /&gt; chomp $line;&lt;BR /&gt; if ($line=~s/\\\s*$//){&lt;BR /&gt;  $line.=&lt;FH&gt;;&lt;BR /&gt;  redo unless eof(FH);&lt;BR /&gt; }&lt;BR /&gt; print "$line\n" if ($line=~/$string/);&lt;BR /&gt;}&lt;BR /&gt;================&lt;BR /&gt;&lt;BR /&gt;so to run it:&lt;BR /&gt;&lt;BR /&gt;% scriptname searchstring filename&lt;BR /&gt;&lt;BR /&gt;rgds, Robin&lt;/FH&gt;&lt;/FH&gt;</description>
      <pubDate>Fri, 14 Feb 2003 09:39:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mulit-line-pattern/m-p/2903700#M936124</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2003-02-14T09:39:31Z</dc:date>
    </item>
  </channel>
</rss>

