The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Replacing string in files
.
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
:
Replacing string in files
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
08-28-2007
vino
Supporter (in vino veritas)
Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
GNU
sed
has an in-place string replacement flag -i
You can do
Code:
sed
-i -e "s/$INPUT_LOCATION/&_upd/g" file1 file2 file3...
vino
View Public Profile
Find all posts by vino
Find vino's past nominations received
Find vino's present nominations given