The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-06-2007
venkatba venkatba is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 3
How to replace string $str1_str2_str3_str4$ to 12.345.65.234

Hi Friends,

I have some problem in replacing a string which is enclosed between $ signs. Please see below:
I am trying to replace the string ($str1_str2_str3_str4$) with 12.345.65.234 but no luck...
I am using the following command for this but it's not doing anything, if I take out the second "\$" sign it works perfect but still I have the second $ sign with the replaced string.

cat web.xml | sed -e "s/\$str1_str2_str3_str4\$/12.345.65.234/" > web_temp.xml

Can somebody give your thoughts how I can replace this whole string ($str1_str2_str3_str4$) with the IP address.

Thanks for your help.

Venkat