<?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: how replace replace a particular string repeated for many times in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917192#M822862</link>
    <description>Hi,&lt;BR /&gt;try&lt;BR /&gt;# sed 'value/rate/g' your_file&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
    <pubDate>Wed, 10 Aug 2005 03:29:45 GMT</pubDate>
    <dc:creator>john korterman</dc:creator>
    <dc:date>2005-08-10T03:29:45Z</dc:date>
    <item>
      <title>how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917191#M822861</link>
      <description>Hi All&lt;BR /&gt; &lt;BR /&gt;   i have a file which contains a word "value" for repeated no. of times and i want to replace that word to "rate" how do i do.&lt;BR /&gt;&lt;BR /&gt;  replacing mainually is not that much possible.&lt;BR /&gt;&lt;BR /&gt;Help me please &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Aug 2005 03:22:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917191#M822861</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2005-08-10T03:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917192#M822862</link>
      <description>Hi,&lt;BR /&gt;try&lt;BR /&gt;# sed 'value/rate/g' your_file&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Wed, 10 Aug 2005 03:29:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917192#M822862</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-08-10T03:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917193#M822863</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# vi file&lt;BR /&gt;&lt;BR /&gt;the do the command&lt;BR /&gt;&lt;BR /&gt;:%s/value/rate/g&lt;BR /&gt;&lt;BR /&gt;this will do ur work.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam</description>
      <pubDate>Wed, 10 Aug 2005 03:31:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917193#M822863</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-08-10T03:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917194#M822864</link>
      <description>What to do if it is multiple files in same directory</description>
      <pubDate>Wed, 10 Aug 2005 03:44:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917194#M822864</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2005-08-10T03:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917195#M822865</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you could also try&lt;BR /&gt;&lt;BR /&gt;vi &lt;FILE&gt;&lt;BR /&gt;&lt;BR /&gt;:%s/&lt;OLD_STRING&gt;/&lt;NEW_STRING&gt;/g&lt;BR /&gt;&lt;BR /&gt;That's it&lt;BR /&gt;&lt;BR /&gt;Franky&lt;/NEW_STRING&gt;&lt;/OLD_STRING&gt;&lt;/FILE&gt;</description>
      <pubDate>Wed, 10 Aug 2005 03:46:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917195#M822865</guid>
      <dc:creator>Franky_1</dc:creator>
      <dc:date>2005-08-10T03:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917196#M822866</link>
      <description>In vi editor,&lt;BR /&gt;&lt;BR /&gt;:%s/value/rate/gi&lt;BR /&gt;&lt;BR /&gt;g - globally changes it&lt;BR /&gt;i - user input to do if yes no if no&lt;BR /&gt;&lt;BR /&gt;Using perl,&lt;BR /&gt;&lt;BR /&gt;perl -pi -e 's/value/rate/g' &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;Using sed,&lt;BR /&gt;&lt;BR /&gt;sed -e 's/value/rate/g' &lt;FILENAME&gt; &amp;gt; newfilename&lt;BR /&gt;mv newfilename filename&lt;BR /&gt;&lt;BR /&gt;hth.&lt;/FILENAME&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Wed, 10 Aug 2005 03:48:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917196#M822866</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-10T03:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917197#M822867</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;for i in `ls &lt;FILENAME&gt;*`&lt;BR /&gt;do&lt;BR /&gt;perl -pi -e 's/&lt;OLD&gt;/&lt;NEW&gt;/g' $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Franky&lt;/NEW&gt;&lt;/OLD&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Wed, 10 Aug 2005 04:02:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917197#M822867</guid>
      <dc:creator>Franky_1</dc:creator>
      <dc:date>2005-08-10T04:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917198#M822868</link>
      <description>One with sed:&lt;BR /&gt;&lt;BR /&gt;for i in `ls &lt;FILENAME&gt;*`&lt;BR /&gt;do&lt;BR /&gt;sed -e 's/&lt;OLD&gt;/&lt;NEW&gt;/g' $i&lt;BR /&gt;done&lt;BR /&gt;&lt;/NEW&gt;&lt;/OLD&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Wed, 10 Aug 2005 04:13:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917198#M822868</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-08-10T04:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917199#M822869</link>
      <description>1. perl -pi does not have to placed in a loop. It'll safely do so for all files on the command line&lt;BR /&gt;&lt;BR /&gt;2. More important. Nobody protected the "value" against being part of another word, like "valued" or "invalueable" (give or take the typoes). The pattern to be replaced, if needed to be recognized as a word, needs to be anchored!&lt;BR /&gt;&lt;BR /&gt;# perl -pi -e's/\bvalue\b/rate/g' file1 file2 file3 ...&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Wed, 10 Aug 2005 04:23:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917199#M822869</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-08-10T04:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917200#M822870</link>
      <description>For multiple files in the same directory then,&lt;BR /&gt;&lt;BR /&gt;perl -pi -e 's/value/rate/g' &lt;DIRECTORY&gt;/*&lt;BR /&gt;&lt;BR /&gt;Multiple files in multiple directory then,&lt;BR /&gt;&lt;BR /&gt;find /&lt;DIR&gt; -type f -name "*" -exec perl -pi -e 's/value/rate/g' {} \+&lt;BR /&gt;&lt;BR /&gt;You can change * in change depends upon file pattern like *.log&lt;BR /&gt;&lt;BR /&gt;hth.&lt;/DIR&gt;&lt;/DIRECTORY&gt;</description>
      <pubDate>Wed, 10 Aug 2005 04:24:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917200#M822870</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-10T04:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917201#M822871</link>
      <description>You can also use xargs + find + perl -pi do change pattern in multiple files in different directories as,&lt;BR /&gt;&lt;BR /&gt;# find &lt;DIR&gt; -type f -name "*" | xargs perl -pi 's/value/rate/g'&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;/DIR&gt;</description>
      <pubDate>Wed, 10 Aug 2005 04:39:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917201#M822871</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-10T04:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917202#M822872</link>
      <description>Yet another way of replacing the desired string on multiple files within a directory. ex works on the existing file so that renaming or moving the original file is not required. Also this replaces whole words only instead of substrings like "valued".&lt;BR /&gt;&lt;BR /&gt;# for i in $(ls &lt;YOUR_FILES&gt;); do&lt;BR /&gt;&amp;gt; cat - &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;&amp;gt; %s/\&lt;VALUE&gt;/rate/g&lt;BR /&gt;&amp;gt; wq&lt;BR /&gt;&amp;gt; EOF&lt;BR /&gt;&amp;gt; done&lt;BR /&gt;&lt;BR /&gt;regards!!&lt;BR /&gt;&lt;/VALUE&gt;&lt;/YOUR_FILES&gt;</description>
      <pubDate>Thu, 11 Aug 2005 01:13:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917202#M822872</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-08-11T01:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: how replace replace a particular string repeated for many times</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917203#M822873</link>
      <description>Hi all&lt;BR /&gt;Thanks for all your valuble responce.&lt;BR /&gt; thank you.</description>
      <pubDate>Thu, 11 Aug 2005 04:23:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-replace-replace-a-particular-string-repeated-for-many-times/m-p/4917203#M822873</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2005-08-11T04:23:01Z</dc:date>
    </item>
  </channel>
</rss>

