The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
SED command ---------help needed
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
SED command ---------help needed
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
03-17-2008
apsprabhu
Registered User
Join Date: Feb 2008
Location: India
Posts: 45
Hi Reddy,
The below script will work for you,
mainStr="abacus"
old_word="ab"
new_word="cd"
result=`cat $mainStr |
sed
"s/$old_word/$new_word/g"`
Last edited by apsprabhu; 03-17-2008 at
08:58 AM
.. Reason: Missed out
apsprabhu
View Public Profile
Find all posts by apsprabhu
Find apsprabhu's past nominations received
Find apsprabhu's present nominations given