<?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: One Liner sed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/one-liner-sed/m-p/4697083#M659093</link>
    <description>Well,... just put all edits on the command line, using -e to introduce each.&lt;BR /&gt;And if you had picked a character other then '!' if could be:&lt;BR /&gt;&lt;BR /&gt;# sed   -e s/^/#/ -e s/$/~/ tmp.tmp&lt;BR /&gt;&lt;BR /&gt;The issue is that depending on the shell (I think) you will need to escape or otherwise hide the "!" &lt;BR /&gt;&lt;BR /&gt;So try:&lt;BR /&gt;&lt;BR /&gt;# sed   -e s/^/#/ -e s/$/\!/   your-file&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# sed   -e s/^/#/ -e 's/$/!/'   your-file&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
    <pubDate>Fri, 08 Oct 2010 13:35:02 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2010-10-08T13:35:02Z</dc:date>
    <item>
      <title>One Liner sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/one-liner-sed/m-p/4697082#M659092</link>
      <description>Hi &lt;BR /&gt;I've sed file which writes # at the start and ! at the end&lt;BR /&gt;&lt;BR /&gt;s/^/#/&lt;BR /&gt;s/$/!/&lt;BR /&gt;&lt;BR /&gt;This works fine.&lt;BR /&gt;But advise me how can convert this in to a sed oneliner instead of using the se file&lt;BR /&gt;&lt;BR /&gt;Sagar</description>
      <pubDate>Fri, 08 Oct 2010 13:11:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/one-liner-sed/m-p/4697082#M659092</guid>
      <dc:creator>Sagar Sirdesai</dc:creator>
      <dc:date>2010-10-08T13:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: One Liner sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/one-liner-sed/m-p/4697083#M659093</link>
      <description>Well,... just put all edits on the command line, using -e to introduce each.&lt;BR /&gt;And if you had picked a character other then '!' if could be:&lt;BR /&gt;&lt;BR /&gt;# sed   -e s/^/#/ -e s/$/~/ tmp.tmp&lt;BR /&gt;&lt;BR /&gt;The issue is that depending on the shell (I think) you will need to escape or otherwise hide the "!" &lt;BR /&gt;&lt;BR /&gt;So try:&lt;BR /&gt;&lt;BR /&gt;# sed   -e s/^/#/ -e s/$/\!/   your-file&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# sed   -e s/^/#/ -e 's/$/!/'   your-file&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Oct 2010 13:35:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/one-liner-sed/m-p/4697083#M659093</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-10-08T13:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: One Liner sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/one-liner-sed/m-p/4697084#M659094</link>
      <description>&amp;gt;HeinThe issue is that depending on the shell (I think) you will need to escape or otherwise hide the "!"&lt;BR /&gt;&lt;BR /&gt;Real shells don't treat "!" as special.&lt;BR /&gt;&lt;BR /&gt;And it's probably a good idea to always use '' for sed expressions:&lt;BR /&gt;sed -e 's/^/#/' -e 's/$/!/' your-file</description>
      <pubDate>Fri, 08 Oct 2010 18:11:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/one-liner-sed/m-p/4697084#M659094</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-10-08T18:11:08Z</dc:date>
    </item>
  </channel>
</rss>

