#!/bin/bash # add textdomain to _e() & __() function calls # in all files in a directory if [ $# != 2 ]; then echo "USAGE: $0 textdomain directory" else if [ -d "$2" ]; then for file in `find $2 -name "*.php" -print` do tmpname=$file".txttmp" addtextdomain.php $1 $file > $tmpname mv $tmpname $file done else echo "ERROR: $2 is not a directory" fi fi