<?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: Search and replace a string inside a shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066315#M737677</link>
    <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot, it was really helpfull.</description>
    <pubDate>Mon, 03 Sep 2007 22:14:49 GMT</pubDate>
    <dc:creator>chinnaga</dc:creator>
    <dc:date>2007-09-03T22:14:49Z</dc:date>
    <item>
      <title>Search and replace a string inside a shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066312#M737674</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to write a shell script which would search and replace a sting for the list of files. I tried using sed inside the shell script, but it doesn't seem to work. could you pls help me with this.</description>
      <pubDate>Fri, 31 Aug 2007 01:52:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066312#M737674</guid>
      <dc:creator>chinnaga</dc:creator>
      <dc:date>2007-08-31T01:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Search and replace a string inside a shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066313#M737675</link>
      <description>#!/bin/bash # This script will search and replace all regular files for a string  # supplied by the user and replace it with another string.  #  # Written by Daniel McCarthy # daniel.mccarthy@linuxphile.org # function usage {   echo ""   echo "Search/replace script"   echo "    Written by Daniel McCarthy"   echo "      daniel.mccarthy@linuxphile.org"   echo "      &lt;A href="http://linuxphile.org" target="_blank"&gt;http://linuxphile.org&lt;/A&gt;"   echo ""   echo "Not enough parameters provided."   echo "Usage: ./$0 searchstring replacestring"   echo "Remember to escape any special characters in the searchstring or the replacestring"   echo "" }  #check for required parameters if  [ ${#1} -gt 0  ]  &amp;amp;&amp;amp;  [ ${#2} -gt 0  ]; then for f in `find  -type f`; do  if grep -q $1 $f;  then   cp $f $f.bak   echo "The string $1 will be replaced with $2 in $f"   sed s/$1/$2/g &amp;lt; $f.bak &amp;gt; $f   rm $f.bak  fi done  else #print usage informamtion  usagefi</description>
      <pubDate>Fri, 31 Aug 2007 01:59:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066313#M737675</guid>
      <dc:creator>AwadheshPandey</dc:creator>
      <dc:date>2007-08-31T01:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Search and replace a string inside a shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066314#M737676</link>
      <description>Hi,&lt;BR /&gt;see the atthaced script.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Mon, 03 Sep 2007 07:56:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066314#M737676</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-09-03T07:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search and replace a string inside a shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066315#M737677</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot, it was really helpfull.</description>
      <pubDate>Mon, 03 Sep 2007 22:14:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/search-and-replace-a-string-inside-a-shell-script/m-p/5066315#M737677</guid>
      <dc:creator>chinnaga</dc:creator>
      <dc:date>2007-09-03T22:14:49Z</dc:date>
    </item>
  </channel>
</rss>

