Swift 脚本(运行时带参数) #!/usr/bin/env xcrun swift import Foundation let args = Process.arguments print("Arg:(args)") chmod +x x.sh 添加执行权限