<?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 Print all lines after a line with given string in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034441#M95136</link>
    <description>Trying to extract the device files for mirrors from lvdisplay. This works, but I'm thinking there must be a slightly better command string to do it:&lt;BR /&gt;&lt;BR /&gt;lvdisplay -v ${LV} | awk '/LE    PV1/,EOF' | grep -v "LE    PV1" | awk '{print $2, $5}' | sort -u</description>
    <pubDate>Fri, 16 Mar 2007 11:23:07 GMT</pubDate>
    <dc:creator>Jeff_Traigle</dc:creator>
    <dc:date>2007-03-16T11:23:07Z</dc:date>
    <item>
      <title>Print all lines after a line with given string</title>
      <link>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034441#M95136</link>
      <description>Trying to extract the device files for mirrors from lvdisplay. This works, but I'm thinking there must be a slightly better command string to do it:&lt;BR /&gt;&lt;BR /&gt;lvdisplay -v ${LV} | awk '/LE    PV1/,EOF' | grep -v "LE    PV1" | awk '{print $2, $5}' | sort -u</description>
      <pubDate>Fri, 16 Mar 2007 11:23:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034441#M95136</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-03-16T11:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Print all lines after a line with given string</title>
      <link>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034442#M95137</link>
      <description>Jeff:&lt;BR /&gt;&lt;BR /&gt;From "Handy one-liners for SED" (attached):&lt;BR /&gt;&lt;BR /&gt;# print section of file from regular expression to end of file&lt;BR /&gt; sed -n '/regexp/,$p'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 16 Mar 2007 11:50:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034442#M95137</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-03-16T11:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Print all lines after a line with given string</title>
      <link>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034443#M95138</link>
      <description>Hi Jeff:&lt;BR /&gt;&lt;BR /&gt;# lvdisplay -v ${LV} | perl -nle 'if (/0000/../ /){@a=split;$dev=$a[1]." ".$a[4];$m{$dev}++};END{for (sort keys %m) {print}}'  &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 16 Mar 2007 12:01:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034443#M95138</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-03-16T12:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Print all lines after a line with given string</title>
      <link>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034444#M95139</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;an awk suggestion:&lt;BR /&gt;lvdisplay -v ... |&lt;BR /&gt;awk '/LE PV1/ {out=1;next}&lt;BR /&gt;out {print $2,$5}' |&lt;BR /&gt;sort -u&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Fri, 16 Mar 2007 12:01:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034444#M95139</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-03-16T12:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Print all lines after a line with given string</title>
      <link>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034445#M95140</link>
      <description>Thosee awk and perl solutions worked. Of course, seeing JRF's test for LE 00000 made me realize I was making it too difficult to start with... the first LE in an LV is always going to be 00000 so simplifies life looking for that instead of the column headers. (My mind was already on vacation, I guess.) This compressed awk option works fine too.&lt;BR /&gt;&lt;BR /&gt;/usr/sbin/lvdisplay -v ${LV} | awk '/00000/,EOF {print $2, $5}' | sort -u</description>
      <pubDate>Fri, 16 Mar 2007 13:08:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/print-all-lines-after-a-line-with-given-string/m-p/5034445#M95140</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-03-16T13:08:21Z</dc:date>
    </item>
  </channel>
</rss>

