The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Go-Global for Unix V 2.2.4 ahm2002 UNIX for Dummies Questions & Answers 1 12-18-2007 12:41 PM
dynamic global script isingh786 Shell Programming and Scripting 2 01-24-2007 05:35 PM
Script to change UNIX password kornshellmaven Shell Programming and Scripting 12 05-17-2006 09:58 AM
Change password script in Unix easily.. zp523444 UNIX for Advanced & Expert Users 4 11-14-2005 12:14 PM
Urgent !!! - Script to Change passwords in unix tofani SUN Solaris 2 09-16-2003 03:58 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 05-12-2008
Registered User
 

Join Date: May 2008
Posts: 33
Quote:
Originally Posted by progkcp View Post
I wanted to thank those who responded to my question. I ended up using a derivation of this solution:

-------------
find . -type f |\
while read file
do
{ rm "${file}"; sed -e '/my_word/s/my_word/new_word/g' > "${file}"; } < "${file}"
done
-----------
Using a mash-up of Jim's response above, and the one you used could have saved you from updating the ctime of every file that you encountered in the directory-tree.

While this may not be important in your case, there are times when this is critical.
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:41 PM.


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