<?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 Find and Replace command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978055#M293989</link>
    <description>Hi Friends,&lt;BR /&gt;&lt;BR /&gt;i have created a file name like myfile.txt , Now i want to search a word in that file and replace with a new word without redirecting to another file. &lt;BR /&gt;N:B: i can do this in vi editor . but i want this from outside ( using the file itself)&lt;BR /&gt;&lt;BR /&gt;Mridul</description>
    <pubDate>Tue, 10 Apr 2007 06:04:42 GMT</pubDate>
    <dc:creator>Mridul Dutta</dc:creator>
    <dc:date>2007-04-10T06:04:42Z</dc:date>
    <item>
      <title>Find and Replace command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978055#M293989</link>
      <description>Hi Friends,&lt;BR /&gt;&lt;BR /&gt;i have created a file name like myfile.txt , Now i want to search a word in that file and replace with a new word without redirecting to another file. &lt;BR /&gt;N:B: i can do this in vi editor . but i want this from outside ( using the file itself)&lt;BR /&gt;&lt;BR /&gt;Mridul</description>
      <pubDate>Tue, 10 Apr 2007 06:04:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978055#M293989</guid>
      <dc:creator>Mridul Dutta</dc:creator>
      <dc:date>2007-04-10T06:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978056#M293990</link>
      <description>Hi,&lt;BR /&gt; &lt;BR /&gt;One possible way is to using sed, then writing into  another file, then moving back to original file.&lt;BR /&gt;&lt;BR /&gt;# cat 1&lt;BR /&gt;senthil&lt;BR /&gt;# sed s/senthil/prabu/g 1 &amp;gt; 2; mv 2 1;&lt;BR /&gt;# cat 1&lt;BR /&gt;prabu&lt;BR /&gt;&lt;BR /&gt;P.S:&lt;BR /&gt;  Not the best solution&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Prabu.S</description>
      <pubDate>Tue, 10 Apr 2007 06:33:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978056#M293990</guid>
      <dc:creator>Senthil Prabu.S_1</dc:creator>
      <dc:date>2007-04-10T06:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978057#M293991</link>
      <description>Hi Mridul,&lt;BR /&gt;&lt;BR /&gt;Without re-directing to another file - I have not noticed yet.&lt;BR /&gt;&lt;BR /&gt;We normally use sed as below:&lt;BR /&gt;&lt;BR /&gt;  sed 's/oldtext/newtext/g' filename&lt;BR /&gt;&lt;BR /&gt;But of course, you need to redirect it to a file if you want to save it - there is no online saving on sed as far as I know. &lt;BR /&gt;&lt;BR /&gt;ed is an option (by automating the steps).&lt;BR /&gt;&lt;BR /&gt;Rasheed Tamton.</description>
      <pubDate>Tue, 10 Apr 2007 06:35:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978057#M293991</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2007-04-10T06:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978058#M293992</link>
      <description>cat &amp;gt; xx&lt;BR /&gt;aap&lt;BR /&gt;noot&lt;BR /&gt;mies&lt;BR /&gt;$ perl -pi -e 's/noot/vuur/' xx  &lt;BR /&gt;$ cat xx&lt;BR /&gt;aap&lt;BR /&gt;vuur&lt;BR /&gt;mies&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:36:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978058#M293992</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-04-10T06:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978059#M293993</link>
      <description>Hey&lt;BR /&gt;&lt;BR /&gt;you can use perl:&lt;BR /&gt;&lt;BR /&gt;#perl -i.del -ple "s/find/replace/" filename&lt;BR /&gt;&lt;BR /&gt;generates an old file named filename.del. after you replaced every file you can delete all *.del files.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 10 Apr 2007 06:42:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978059#M293993</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2007-04-10T06:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978060#M293994</link>
      <description>How about the following ex(1) construct:&lt;BR /&gt;&lt;BR /&gt;# ex -s +'%s/search_word/replace_word/g | wq' infile&lt;BR /&gt;&lt;BR /&gt;~cheers</description>
      <pubDate>Tue, 10 Apr 2007 07:08:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978060#M293994</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-04-10T07:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Find and Replace command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978061#M293995</link>
      <description>Hi Mridul,&lt;BR /&gt;by vi is possibile to change by command line:&lt;BR /&gt;&lt;BR /&gt;vi -c "%s/search_word/replace_word/g|wq" file.in&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Wed, 11 Apr 2007 02:45:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-and-replace-command/m-p/3978061#M293995</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-04-11T02:45:41Z</dc:date>
    </item>
  </channel>
</rss>

