カレントディレクトリにあるすべてのファイルに置換コマンドを通したいときがある。サブディレクトリも再帰的に処理したい。 そういうときのために。 シェルスクリプトでやってみる。 参考URL:http://www.shido.info/misc/misc.php?id=29 #!/bin/sh function recursiveReplace { for file in `ls $1`; do if [ $0 != ${file} ] && [ "tmp" != ${file} ]; then FULLPATH=${1}/${file} if [ -f ${FULLPATH} ]; then cp ${FULLPATH} ./tmp; tr $2 $3 < ./tmp > ${FULLPATH} elif [ -d ${FULLPATH} ]; then recursiveReplace ${