Skip to content

Instantly share code, notes, and snippets.

@Ceri-anne
Created August 31, 2018 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ceri-anne/4959356c5ac0c7c0a463b0de6fc3521c to your computer and use it in GitHub Desktop.
Save Ceri-anne/4959356c5ac0c7c0a463b0de6fc3521c to your computer and use it in GitHub Desktop.
func run() {
    let arguments = CommandLine.arguments
    if arguments.count > 1 {
        let greeting = arguments[1]
        print(greeting)
    }
    if arguments.count > 2 {
        let number = arguments[2]
        print(number)
    }
    print("Hello, World! This is my command line tool")
}
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment