The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Global replace with sed
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Rules & FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
Global replace with sed
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
6
(
permalink
)
05-15-2008
danmero
丹
Join Date: Nov 2007
Location: 45.48-73.63
Posts: 415
Use a temp file.
Code:
find . -name "*.txt" -type f -exec sed 's/ugly/bad/g' {} > tmp \; -exec mv tmp {} \;
danmero
View Public Profile
Find all posts by danmero