chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Adding (system->string) somewhere


From: Kon Lovett
Subject: Re: [Chicken-users] Adding (system->string) somewhere
Date: Mon, 14 Jan 2008 11:45:34 -0800

Hi,

See also http://galinha.ucpel.tche.br/Unit%20utils#system

On Jan 14, 2008, at 6:03 AM, Ozzi wrote:

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.
   -Ivan
Ozzi <address@hidden> writes:
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. See
system."

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)))

Either the library or posix units look like good candidates to me.



_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users

Best Wishes,
Kon






reply via email to

[Prev in Thread] Current Thread [Next in Thread]