Created
October 9, 2016 23:04
-
-
Save PaulWoodIII/d6c1f30a56ac14558ce79a94c50353ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env xcrun swift | |
| import Foundation | |
| print("This is a swift script!") | |
| print("Arguments: \(ProcessInfo.processInfo.arguments)") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usage might be like ./myScriptName.swift -- a b c d.
Update to Swift 3
Thanks to Erica Sadun for this little snippet I like the usage of swift for scripting some things like this.