philipbohun.com

Glojure by Example: Command-Line Arguments

*command-line-args* is the sequence of arguments after the script name. It does not include the glj program or the script path. os.Args is the raw Go slice and does include both.

(doseq [arg *command-line-args*]
  (println arg))

Quote an argument that contains a space.

$ glj command-line-arguments.glj one 'two three'
one
two three

Next example: Command-Line Flags.