bash scripting challenge -
I have to write a bash script that will repeat the contents of a directory (including the subdirectory) and will substitute the following:
- Replace 'foo' with any file name with 'bar'
- Replace 'foo' in the contents of any file with 'bar'
So far I have found
find -name '*' -exec {} \]
: -)
rename E>:
find -f \ (-exec sed -is / foo / bar / g \ ;, -name \ * foo \ * -exec rename foo bar {} \; \ )
Comments
Post a Comment