Reputation: 57261
I would like to read the output of a shell command.
The shell command I want to read must be run from a specific location. (it's git log
).
Is there a nice way to do this other than cd
ing into the location, running (clojure.java.shell/sh "git log")
, and then cd
ing back to the working directory?
I'm looking for some sort of (shell-at directory command)
function. A simple implementation of this function would also be appreciated. My experience with Clojure is minimal.
Upvotes: 23
Views: 2320