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.

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-21-2008
Registered User
 

Join Date: Dec 2007
Posts: 10
help in sed

I want to replace followong formate :

20 €-

with -20

please tell how this can be done?
Reply With Quote
Forum Sponsor
  #2  
Old 01-21-2008
Registered User
 

Join Date: Jan 2008
Posts: 12
Smile try this ..

team$ val=`echo 20 ^À-`
team$ echo $val
20 €-
team$ echo $val | sed s/"$val"/-20/
-20
team$
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:46 AM.


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 Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0