Can anyone explain me about the sh in clojure in order to execute the system command?

后端 未结 2 1005
一向
一向 2021-01-29 06:25

I\'m using Mac OS. I want to execute a system command using (use \'[clojure.java.shell :only [sh]]), like in How to execute system commands?. I have read https://cl

2条回答
  •  天命终不由人
    2021-01-29 07:12

    On MacOS or Linux this works:

    user=> (require '[clojure.java.shell :as sh])
    nil
    user=> (sh/sh "ls" "-la")
    ...
    

提交回复
热议问题