标签:后缀 color 需要 images image ges files div for
#!/bin/sh root_src=$(dirname $(PWD)) echo ${root_src} image_path=${root_src}/images echo ${image_path} # find ${image_path} -name *.png -exec echo {} \; # find ${image_path} -name "*.png" -o -name "*.hhh" -exec echo {} \; # find ${image_path} -regex ‘*.png\|*.jpg‘ -exec echo {} \; pngfiles=`find ${image_path} -name *.png ` suffix2x=‘@3x.png‘ suffix3x=‘@2x.png‘ for file in $pngfiles do if [[ ${file} =~ ${suffix2x} || ${file} =~ ${suffix3x} ]] then echo "${file}不变" else echo "${file}需要添加@3x" mv ${file} "${file%.png}@3x.png" fi done
标签:后缀 color 需要 images image ges files div for
原文地址:http://www.cnblogs.com/developer-qin/p/7248818.html