Tuesday, September 29, 2009

howto edit multiple files via command line

In order to replace a regexp in multiple files using the command line use:

sed -i -e 's/regexp/new_regexp/' file_name

where file_name can be also a regexp (e.g. *.txt)

No comments:

Post a Comment

Please Comment this Post or send me an Email