echo "1.开始截屏"
adb shell screencap /sdcard/screen.png
workDir="$(cd $(dirname $0); pwd)"
adb pull /sdcard/screen.png $workDir
echo "截屏成功"
echo "----------------------------"
echo "2.存储目录 $(cd $(dirname $0); pwd)"
echo "3.图片名称screen.png"
osascript -e 'tell application "Terminal" to quit' &
exit
1 编写shell脚本screen.sh
2 将screen.sh修改为screen.command
3 执行以下命令给文件赋予可执行权限
chmod +x run.command
4 完成,此时双击run.command文件即可执行shell中的命令,同时会唤起Terminal