Thursday, October 7, 2010

Search and replace in multiple files

I had a situation where , I need to replace a word with 'replace' in 181 xsd files. where I used following simple command.

search string : types.xsd
replace string : common/types.xsd

command inside the directory conain files :


perl -pi -e 's/types.xsd/common\/types.xsd/g' *.xsd

No comments:

Post a Comment