Skip to content

Instantly share code, notes, and snippets.

@sgr-ksmt
Created August 30, 2016 10:22
Show Gist options
  • Save sgr-ksmt/32752cefe2c38cfb74e62b8845a0d817 to your computer and use it in GitHub Desktop.
Save sgr-ksmt/32752cefe2c38cfb74e62b8845a0d817 to your computer and use it in GitHub Desktop.
swift scripting for 2.2 and 3.0!
#!/usr/bin/env xcrun swift
let arguments = Array(Process.arguments.dropFirst())
print(arguments.joinWithSeparator(","))
#!/usr/bin/env xcrun swift
let arguments = Array(CommandLine.arguments.dropFirst())
print(arguments.joined(separator: ","))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment