linux 批量替换某一目录下的某些文件的特定字符 - cytggit/Map-openlayers GitHub Wiki

command:

find /opt/java/tomcat7_app/webapps/ -type f -name *.html -o -name *.jsp -o -name *.js |xargs grep "old str" | awk -F ':' '{print $1}' | sort -u | xargs sed -i 's/old str/new str/g'