The UNIX and Linux Forums  

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Search, replace string in file1 with string from (lookup table) file2? gstuart Shell Programming and Scripting 9 06-08-2009 07:11 AM
replace string sam99 Shell Programming and Scripting 4 03-04-2008 01:39 AM
replace a string melanie_pfefer Shell Programming and Scripting 11 01-17-2008 10:57 AM
Replace string B depending on occurence of string A hemangjani Shell Programming and Scripting 1 12-05-2006 05:10 PM
How to replace within a string aukequist Shell Programming and Scripting 2 02-07-2006 07:42 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0