]> njoseph.me Git - babashka-scripts.git/blob - scripts/utils.clj
Add .lsp/ folder to .gitignore
[babashka-scripts.git] / scripts / utils.clj
1 (ns utils
2 (:require [lib :refer [run-cmd]]))
3
4 (defn run-seq
5 "Run a sequence of shell commands on a sequence of arguments.
6
7 Examples:
8
9 1. Play and delete each video from a folder
10 ls | bb -i '(run-seq [\"mpv\" \"rm\"] *input*)'
11 "
12 [commands arguments]
13 (doseq [argument arguments
14 command commands]
15 (println (run-cmd [command argument]))))