On 07/05/12 16:32, Craig Brozefsky wrote:
"Jim - FooBar();"<jimpil1...@gmail.com> writes:
In preference to using Runtime/exec, you can use
clojure.java.shell/sh and write your password to the stdin of the
process using its :in argument.
Now that sounds more sensible but it means that the consumer has to
have clojure...what if i was to aot-compile the function with
gen-class to pretend it is plain Java?
The consumer would not need clojure, he is not suggesting you use some
clojure shell command, but rather the clojure.java.shell/sh function
which lets you write to stdin (and read stdout) from a shell process you
call from your Java program.
Also, you will need to invoke sudo with the -S argument so it reads from
stdin, and not from a pty.
aaaa ok ....sorry i misunderstood!!!
will try that...
Jim
--
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