Skip to content

Instantly share code, notes, and snippets.

@stelcodes
Last active May 27, 2021 21:14
Show Gist options
  • Save stelcodes/1d7105f8a688852a752fd85482f45875 to your computer and use it in GitHub Desktop.
Save stelcodes/1d7105f8a688852a752fd85482f45875 to your computer and use it in GitHub Desktop.
Babashka passing arguments example script
#!/usr/bin/env bb
;; Replicating bash/zsh "<command> $@" in babashka
(require '[babashka.process :refer [process tokenize]])
(def command "java -jar /deploy/zprint/zprint.jar")
(as-> command $
(tokenize $)
(concat $ *command-line-args*)
(do @(process $ {:inherit true}) nil))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment