I highly recommend https://github.com/Raynes/conch, it has a nicer "UI" and it supports timeouts pipelining etc..
On Friday, March 21, 2014 8:34:02 AM UTC+2, Sean Corfield wrote: > > On Mar 20, 2014, at 9:41 PM, gvim <gvi...@gmail.com <javascript:>> wrote: > > I'm not familiar with the Java standard library and didn't find anything > matching my question on Google so here goes. From my Clojure app I need to > call an executable written in C and parse the text output within my Clojure > app. What's the standard way to call an external process and read its > output? In Ruby I use: > > > > ext = IO.popen '/path/to/file' > > ext.readlines.each {|line| process line} > > ext.close > > (-> (clojure.java.shell/sh "/path/to/file") > :out > (clojure.string/split #"\n")) > > See: > > http://clojure.github.io/clojure/clojure.java.shell-api.html#clojure.java.shell/sh > > and: > > http://clojure.github.io/clojure/clojure.string-api.html#clojure.string/split > > Sean Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "Perfection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880) > > > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.