<?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: Help with SED and variable for regexpr in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227239#M679535</link>
    <description>Yay...thanks!!</description>
    <pubDate>Fri, 26 Feb 2010 18:24:39 GMT</pubDate>
    <dc:creator>dev44</dc:creator>
    <dc:date>2010-02-26T18:24:39Z</dc:date>
    <item>
      <title>Help with SED and variable for regexpr</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227237#M679533</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to be able to find a string and then print the next line.  The string is a variable.  If I hard code it in the below line, it works but it won't take a variable.  I have tried double quotes; single quotes; back slashes, etc.  Maybe not the right combo or syntax though.&lt;BR /&gt;&lt;BR /&gt;cat file|sed -n '/$VAR/{n;p;}'</description>
      <pubDate>Fri, 26 Feb 2010 17:37:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227237#M679533</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2010-02-26T17:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SED and variable for regexpr</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227238#M679534</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You need double quotes to allow the shell to expand the variable:&lt;BR /&gt;&lt;BR /&gt;# VAR=whatever&lt;BR /&gt;# sed -n "/$VAR/{n;p;}" file&lt;BR /&gt;&lt;BR /&gt;Notice that the 'cat' into a pipe is superfluous.  The 'sed' reads STDIN just fine, saving you a process.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 26 Feb 2010 18:16:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227238#M679534</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-02-26T18:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SED and variable for regexpr</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227239#M679535</link>
      <description>Yay...thanks!!</description>
      <pubDate>Fri, 26 Feb 2010 18:24:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227239#M679535</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2010-02-26T18:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SED and variable for regexpr</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227240#M679536</link>
      <description>Note: GNU grep has a -A # option to print context around your match.</description>
      <pubDate>Fri, 26 Feb 2010 20:44:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed-and-variable-for-regexpr/m-p/5227240#M679536</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-02-26T20:44:57Z</dc:date>
    </item>
  </channel>
</rss>

