cd到任何一个文件夹 sudo vim aaa,里面内容如下:
修改aaa的权限chmod +x aaa
如果执行./aaa
报
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
则下载PackageApplication放到以下目录
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/
然后执行
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
chmod +x /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication