(require '[babashka.process :as p]
'[clojure.java.io :as io])
(with-open [w (io/writer "hello.txt")]
(-> (p/pipeline
(p/pb '[echo foo])
(p/pb '[cat "bb.edn"]))
last
(p/process '[cat] {:out w})
p/check))
(slurp "hello.txt")
(with-open [w (io/writer "hello.txt")]
(->> (p/pipeline
(p/pb '[echo foo])
(p/pb '[cat "bb.edn"] {:out w}))
(run! p/check)))
(slurp "hello.txt")