Quick tip to change parameters in different files

for i in *.cfg; do mv $i $i.bak;sed \’s/a/b/\’ $i.bak > $i; done

The above command is very useful to change certain regular expressions in couple of files in one directory. This can be used in variety of ways to achieve a lot of things which would normally take some time to do manually.

About Amit Agarwal