HI everyone
I looking for help to use sed.
I have 82 files. In each file I need to replace a word by another. All files are on the same directory.all files are texte files.
I need to keep the same file name for all file that will be modified.
Here is an exemple :
file name :
saturne_titan_20080609.txt
saturne_titan_20080709.txt ..etc
Files look like this inside :
cactus_sun_20080609.DIMG
cactus_sun_20080609.DIMG
I did try to replace the word cactus on this way
PHP Code:
sed 's/cactus/catusv2/g'
but like this I have to work file by file like :
PHP Code:
cat saturne_titan_20080609.txt | sed 's/cactus/catusv2/g' > saturne_titan_20080609_new.txt
and then delete the saturne_titan_20080609.txt and rename the saturne_titan_20080609_new.txt to saturne_titan_20080609.txt.
I am looking for an easy way to do everything in one command line. If possible
Thanks a lot if you can help me on this