Skip to content

executing

Blake Merryman edited this page Jan 29, 2015 · 1 revision

Executing Inline

To execute a Swift script inline from the Terminal, simply:

$ cd /path/to/program/
$ swift myprogram.swift

# myprogram.swift executes...

You can even pass in arguments:

$ swift myprogram.swift argument1 argument2

# myprogram.swift executes with arguments 1 & 2 being passed in
Clone this wiki locally