The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
replace a string
.
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
:
replace a string
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
7
(
permalink
)
01-17-2008
vino
Supporter (in vino veritas)
Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
Code:
sed
-e "s/
\(install_location=.\)
[^/]*
\(\/.*\)
/\1`hostname`\2/g" file
vino
View Public Profile
Find all posts by vino
Find vino's past nominations received
Find vino's present nominations given