<?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: sed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053807#M435299</link>
    <description># sed -n '/HOME}/s/.*{\(.*HOME\)}.*/\1/p' infile</description>
    <pubDate>Tue, 19 Jun 2007 15:21:12 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2007-06-19T15:21:12Z</dc:date>
    <item>
      <title>sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053803#M435295</link>
      <description>Hello all, &lt;BR /&gt;&lt;BR /&gt;Just been looking into forum but couldn't find what I am looking for. I need to extract the content from a file that is between { } from any of these strings.&lt;BR /&gt;&lt;BR /&gt;${C123QHOME}&lt;BR /&gt;${C12QHOME}&lt;BR /&gt;&lt;BR /&gt;Or anything else between { } and drop that to a variable. I know that sed would do it but just can't start... any help?&lt;BR /&gt;&lt;BR /&gt;So let's say ${C124HOME} would become C124HOME into a variable and then:&lt;BR /&gt;&lt;BR /&gt;echo MYVAR&lt;BR /&gt;C124HOME</description>
      <pubDate>Tue, 19 Jun 2007 14:09:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053803#M435295</guid>
      <dc:creator>Stéphane Gauthier</dc:creator>
      <dc:date>2007-06-19T14:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053804#M435296</link>
      <description># cat infile&lt;BR /&gt;${C124HOME}&lt;BR /&gt;&lt;BR /&gt;# MYVAR=$(sed 's/.*{\(.*\)}.*/\1/p' infile)&lt;BR /&gt;&lt;BR /&gt;# echo $MYVAR&lt;BR /&gt;C124HOME</description>
      <pubDate>Tue, 19 Jun 2007 14:15:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053804#M435296</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-06-19T14:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053805#M435297</link>
      <description># MYVAR=$(tr -d '${}' &amp;lt; infile)</description>
      <pubDate>Tue, 19 Jun 2007 14:36:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053805#M435297</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2007-06-19T14:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053806#M435298</link>
      <description>Ok but it gives me other stuff since there are some other string inside the file that has {} sign. The string always finished by HOME}, like :&lt;BR /&gt;&lt;BR /&gt;cd ${C124HOME}&lt;BR /&gt;cd ${CAAHOME}&lt;BR /&gt;cd ${CAAQHOME}&lt;BR /&gt;&lt;BR /&gt;I want to make sure I get only what could be inside ${***HOME}. All .profile files has that command :&lt;BR /&gt;&lt;BR /&gt;cd ${***HOME} &lt;BR /&gt;ie.&lt;BR /&gt;cd ${CAAHOME}&lt;BR /&gt;or&lt;BR /&gt;cd ${CAAQHOME}&lt;BR /&gt;or &lt;BR /&gt;cd ${TCEHOME}&lt;BR /&gt;&lt;BR /&gt;Tks</description>
      <pubDate>Tue, 19 Jun 2007 15:13:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053806#M435298</guid>
      <dc:creator>Stéphane Gauthier</dc:creator>
      <dc:date>2007-06-19T15:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053807#M435299</link>
      <description># sed -n '/HOME}/s/.*{\(.*HOME\)}.*/\1/p' infile</description>
      <pubDate>Tue, 19 Jun 2007 15:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053807#M435299</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-06-19T15:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053808#M435300</link>
      <description>Tks for your help. That is exactly what I was looking for..</description>
      <pubDate>Tue, 19 Jun 2007 15:49:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed/m-p/5053808#M435300</guid>
      <dc:creator>Stéphane Gauthier</dc:creator>
      <dc:date>2007-06-19T15:49:52Z</dc:date>
    </item>
  </channel>
</rss>

