On Jan 15, 2008, at 4:43 PM, Zbigniew wrote:
On Jan 15, 2008 6:08 PM, Kon Lovett [EMAIL PROTECTED] wrote:
[Zb wrote:]
If with-input-from-pipe were to
optionally take a list as first argument, and (if a list) open a
pipe
bypassing the shell in this manner, that might be something worth
Yes, that egg was pointed out to me. It's a neat egg, but I feel more
complicated than necessary 9 times out of 10.
Ivan Raikov wrote:
Hello,
If I understand this description correctly, the runcmd egg has this
functionality. Take a look at its documentation and see if it would
work for you.
Ozzi [EMAIL PROTECTED] writes:
I am using the following code, which just takes a single string:
(define (system-string cmd)
(string-chomp (with-input-from-pipe cmd read-all)))
On Jan 14, 2008 1:45 PM, Kon Lovett [EMAIL PROTECTED] wrote:
See also
On Jan 10, 2008 10:11 AM, Ozzi [EMAIL PROTECTED] wrote:
I am using the following code, which just takes a single string:
(define (system-string cmd)
(string-chomp (with-input-from-pipe cmd read-all)))
First, the string-chomp is pointless unless you're reading only one
line. Why chomp just
how about
(define (system-string . args)
(string-chomp (with-input-from-pipe (string-join args ) read-all)))
this is assuming that you meant that you want to construct a single command
from a list of strings. if you wanted each string to be a separate command
it could look like:
(define
Could we get something akin to (system-string) added to Chicken somewhere?
Summary from:
http://practical-scheme.net/wiliki/schemexref.cgi?system-%3estring
Appends all strings, then calls the result string as a command, and collects
the output from the command into a string to be returned.