rename.sh 232 B

123456
  1. #!/bin/sh
  2. for n in `find * -name "*.c"` `find * -name "*.h"` `find * -name "*.am"` `find * -name "*.conf"` `find * -name "*.conf.in"`
  3. do
  4. cat $n | sed -e "s/$1/$2/g" > $n.new
  5. mv $n.new $n || echo "Move failed: $n.new to $n"
  6. done