shell script to change value inside files


On Solaris 10
I have 1000 files with a few lines in each one of them.
I need to change the word LOGGING to NOLOGGING.
Can some one, please, post the script to do so.
It has to be done only once and the string LOGGING will only apear once in each line.

Who is Participating?
sed 's/LOGGING/NOLOGGING/' filename >
mv filename

Should change LOGGING to NOLOGGING in one file. To use these commands on 1000 files, a loop would be needed. Is there a pattern for the files in which the changes needs to be they all exist in a directory or have a particular filename pattern etc.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.