Instantly share code, notes, and snippets.

Embed
What would you like to do?
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