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

 > First, the string-chomp is pointless unless you're reading only one
 > line.  Why chomp just the last newline of a multi-line string?

        Believe me or not, but the POSIX Shell behaves exactly that way.
        Consider using `print' on the result:

(print (system-string "ls"))

        I'm not sure that one should mimic the Shell behaviour in
        Scheme, though.

[...]



_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to