I'm sure this is embarrassingly simple, but I can't seem to figure out how to pipe stdout to stdin with clojure.java.process.
With clojure.java.shell, I could do something like
(sh "cat" "-" :in (:out (sh "echo" "hi")))
I realize this is an indirect way to handle this since it's blocking and is handling everything as strings instead of native Java objects.
With clojure.java.process, I could do something like
(exec "bash" "-c" "echo hi | cat -")
but that's just using Bash.
I know there are other, third-party libraries such as Babashka/process and Raynes/conch, but I'd like to learn how to do this with the new Clojure library.
My instinct was to try
(exec {:in (stdout (start "echo" "hi"))} "cat" "-")
or something to that effect, but it doesn't work.