chicken-users
[Top][All Lists]
Advanced

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

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


From: Ozzi
Subject: [Chicken-users] Adding (system->string) somewhere
Date: Thu, 10 Jan 2008 10:11:13 -0600
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

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.




reply via email to

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