Quick tip to change parameters in different filesNo Gravatar
Hot:sun Quick tip to change parameters in different filessun Quick tip to change parameters in different filessun dark Quick tip to change parameters in different filessun dark Quick tip to change parameters in different filessun dark 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.

Originally posted 2008-10-16 21:04:58.


related post

Share This Post

Technorati Tags: bash, Linux, sed

Blog Traffic Exchange Related Posts Blog Traffic Exchange Related Websites