<?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: change string in a file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053718#M304944</link>
    <description>&amp;gt;Awadhesh: you can use vi also for same.&lt;BR /&gt;%s/txt/prn/g&lt;BR /&gt;&lt;BR /&gt;It would probably be safer to use:&lt;BR /&gt;%s/\.txt$/.prn/&lt;BR /&gt;&lt;BR /&gt;Only get the extensions on the end of lines.</description>
    <pubDate>Mon, 13 Aug 2007 02:34:06 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-08-13T02:34:06Z</dc:date>
    <item>
      <title>change string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053715#M304941</link>
      <description>I have a file , the content is as below ,   all lines ended with .txt , I want to change all lines to .prn ,  I try to use the script (sed -e "s/.txt/.prn/"  file &amp;gt; new_file) , but not work , can advise what can I do ? thx&lt;BR /&gt;&lt;BR /&gt;$vi file&lt;BR /&gt;abc.txt&lt;BR /&gt;abd.txt&lt;BR /&gt;abe.txt&lt;BR /&gt;abf.txt&lt;BR /&gt;abg.txt</description>
      <pubDate>Mon, 13 Aug 2007 01:41:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053715#M304941</guid>
      <dc:creator>ust3</dc:creator>
      <dc:date>2007-08-13T01:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: change string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053716#M304942</link>
      <description>What do you mean "but not work"?&lt;BR /&gt;It seems your sed command should work fine.  All I'd do is make sure you quote the ".":&lt;BR /&gt;$ sed -e "s/\.txt/.prn/" file &amp;gt; new_file</description>
      <pubDate>Mon, 13 Aug 2007 01:53:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053716#M304942</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-13T01:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: change string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053717#M304943</link>
      <description>u can use vi also for same.&lt;BR /&gt;&lt;BR /&gt;%s/txt/prn/g&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sunsite.uakom.sk/sunworldonline/swol-11-1997/swol-11-unix101.html" target="_blank"&gt;http://sunsite.uakom.sk/sunworldonline/swol-11-1997/swol-11-unix101.html&lt;/A&gt;</description>
      <pubDate>Mon, 13 Aug 2007 02:18:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053717#M304943</guid>
      <dc:creator>AwadheshPandey</dc:creator>
      <dc:date>2007-08-13T02:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: change string in a file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053718#M304944</link>
      <description>&amp;gt;Awadhesh: you can use vi also for same.&lt;BR /&gt;%s/txt/prn/g&lt;BR /&gt;&lt;BR /&gt;It would probably be safer to use:&lt;BR /&gt;%s/\.txt$/.prn/&lt;BR /&gt;&lt;BR /&gt;Only get the extensions on the end of lines.</description>
      <pubDate>Mon, 13 Aug 2007 02:34:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-string-in-a-file/m-p/4053718#M304944</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-13T02:34:06Z</dc:date>
    </item>
  </channel>
</rss>

