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

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -