<?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 sed  command needed please in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-needed-please/m-p/5722139#M638822</link>
    <description>&lt;P&gt;Morning All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am writing a remediation script to a very tight deadline accross HPUX, Solaris and AIX, and am looking for something that I am sure is pretty easy but isconsuming lots of my time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to edit a text file using sed.&amp;nbsp;base on different conditions,&amp;nbsp; so a file may have the following different entries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DICTIONDBDIR=/var/passwd&lt;/P&gt;&lt;P&gt;#DICTIONDBDIR=/var/passwd&lt;/P&gt;&lt;P&gt;DICTIONDBDIR=/var/passwd/helpme&lt;/P&gt;&lt;P&gt;DICTIONDBDIR=/var/passwd/elvis/is/alive&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to simply replace any of these with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DICTIONDBDIR=/var/passwd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using sed, any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp; very much&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jul 2012 09:32:07 GMT</pubDate>
    <dc:creator>Dadski</dc:creator>
    <dc:date>2012-07-13T09:32:07Z</dc:date>
    <item>
      <title>sed  command needed please</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-needed-please/m-p/5722139#M638822</link>
      <description>&lt;P&gt;Morning All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am writing a remediation script to a very tight deadline accross HPUX, Solaris and AIX, and am looking for something that I am sure is pretty easy but isconsuming lots of my time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to edit a text file using sed.&amp;nbsp;base on different conditions,&amp;nbsp; so a file may have the following different entries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DICTIONDBDIR=/var/passwd&lt;/P&gt;&lt;P&gt;#DICTIONDBDIR=/var/passwd&lt;/P&gt;&lt;P&gt;DICTIONDBDIR=/var/passwd/helpme&lt;/P&gt;&lt;P&gt;DICTIONDBDIR=/var/passwd/elvis/is/alive&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to simply replace any of these with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DICTIONDBDIR=/var/passwd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using sed, any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp; very much&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 09:32:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-needed-please/m-p/5722139#M638822</guid>
      <dc:creator>Dadski</dc:creator>
      <dc:date>2012-07-13T09:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: sed  command needed please</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-needed-please/m-p/5722211#M638823</link>
      <description>&lt;P&gt;Probably something simple like:&lt;/P&gt;&lt;P&gt;sed -e 's:.*DICTIONDBDIR=/var/passwd.*$:DICTIONDBDIR=/var/passwd:' file &amp;gt; file.new&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 10:43:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-needed-please/m-p/5722211#M638823</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-07-13T10:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: sed  command needed please</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-needed-please/m-p/5878931#M638824</link>
      <description>&lt;P&gt;Besides marking my post as a solution, it would nice if you also assigned kudos.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 11:09:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command-needed-please/m-p/5878931#M638824</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-11-26T11:09:37Z</dc:date>
    </item>
  </channel>
</rss>

