<?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: ksh help: list following 3 lines after find a keyword in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6500670#M496581</link>
    <description>&lt;P&gt;In case your site doesn't allow open source software outside of hp.com, you can use awk:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;awk '/&lt;/STRONG&gt;&lt;EM&gt;pattern&lt;/EM&gt;&lt;STRONG&gt;/{print;getline;print;getline;print;getline;print}' &lt;/STRONG&gt;&lt;EM&gt;filename&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;where &lt;EM&gt;pattern&lt;/EM&gt; is whatever keyword(s) you are looking for, and &lt;EM&gt;filename&lt;/EM&gt; is the name of the file.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2014 12:29:03 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2014-06-05T12:29:03Z</dc:date>
    <item>
      <title>ksh help: list following 3 lines after find a keyword</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6498382#M496579</link>
      <description>&lt;P&gt;I have a large files, and some lines include a keyword that I am looking for. Further, I wanted to list next 3 lines following the line that&amp;nbsp; includes the keywork.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. This thread has been moved&amp;nbsp;from HP-UX &amp;gt; System Administration o HP-UX &amp;gt; languages. - Hp Forum Moderator&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 09:22:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6498382#M496579</guid>
      <dc:creator>Hanry Zhou</dc:creator>
      <dc:date>2014-06-05T09:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: list following 3 lines after finding a keyword</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6500322#M496580</link>
      <description>&lt;P&gt;Get yourself gnu grep and just use -A3.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 09:33:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6500322#M496580</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2014-06-06T09:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: ksh help: list following 3 lines after find a keyword</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6500670#M496581</link>
      <description>&lt;P&gt;In case your site doesn't allow open source software outside of hp.com, you can use awk:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;awk '/&lt;/STRONG&gt;&lt;EM&gt;pattern&lt;/EM&gt;&lt;STRONG&gt;/{print;getline;print;getline;print;getline;print}' &lt;/STRONG&gt;&lt;EM&gt;filename&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;where &lt;EM&gt;pattern&lt;/EM&gt; is whatever keyword(s) you are looking for, and &lt;EM&gt;filename&lt;/EM&gt; is the name of the file.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 12:29:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6500670#M496581</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2014-06-05T12:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: list following 3 lines after finding a keyword</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6501824#M496582</link>
      <description>&lt;P&gt;&amp;gt;In case your site doesn't allow open source software&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you like cryptic commands you can use sed:&lt;/P&gt;&lt;P&gt;sed -e '&lt;BR /&gt;/pattern/ {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; n; n; n; p&lt;BR /&gt;}&lt;BR /&gt;d'&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Note: sed uses REs and awk uses EREs.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 09:33:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-help-list-following-3-lines-after-find-a-keyword/m-p/6501824#M496582</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2014-06-06T09:33:12Z</dc:date>
    </item>
  </channel>
</rss>

