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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to replace word in CSV kinmak Shell Programming and Scripting 4 04-24-2008 10:24 AM
Replace word in a file sasiharitha UNIX for Dummies Questions & Answers 3 12-04-2007 09:11 PM
replace word in a file ust Shell Programming and Scripting 5 11-30-2007 04:03 PM
Replace word. abu_hassan SUN Solaris 2 03-04-2007 01:14 PM
How to replace one word across too many files at once moe2266 Shell Programming and Scripting 2 12-15-2006 06:56 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-24-2006
Registered User
 

Join Date: Jul 2006
Posts: 31
how to replace a word with another

Hi All,

v_notes = "Ravi & kumar & garlapati"

i want out put like "Ravi and kumar and garlapati"

What is the command to get this as output, we have to replace all & with and.

Hope this is clear.

Regards,
Ravi Kumar Garlapati
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-24-2006
Registered User
 

Join Date: Jun 2006
Location: Delhi, India
Posts: 88
sed 's/&/and/g'

echo "Ravi & kumar & garlapati" | sed 's/&/and/g'
Ravi and kumar and garlapati

Similar questions have been answered earlier too. Please try and search first.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0