There are multiple ways of creating `list`. Here are some.
ls > listIn file_path you can mention something like *.java for example to search all java files alone.
grep -l "FIND_STRING" file_path > list
Below is the bash script which you can put in an executable file and run.
#!/usr/bin/ksh
for var in `cat list`
do
sed -i "s/FIND_STRING/REPLACE_STRING/g" $var
done
No comments:
Post a Comment