1. 拷贝文件名为 1???.png dest目录
find . -name "1???.png" -exec cp {} ../../src/ \;
脚本:
1. 循环脚本,可在android 平台上跑
min_chan=21
max_chan=100
while [ $min_chan -le $max_chan ]
do
adb shell input keyevent DPAD_UP
sleep 3
echo "next channel done"
sleep 0.1
done
2. 批量处理src目录底下的*.png, 截取350X160+50+50 尺寸
if [ `ls src/*/*.png 2> /dev/null | wc -l ` -gt 0 ]; then
for file in src/*/*.png; do
convert "$file" -crop 350X160+50+50 "${file%.*}_crop.jpg"
file "$file" #uncomment for testing
rm "$file"
done
fi
convert 1000_base/1/1011.png -crop 250X110+120+80 test.jpg