[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: Adding (system->string) somewhere
From: |
Ivan Shmakov |
Subject: |
[Chicken-users] Re: Adding (system->string) somewhere |
Date: |
Tue, 15 Jan 2008 02:32:17 +0600 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
>>>>> Zbigniew <address@hidden> 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.
[...]
- Re: [Chicken-users] Adding (system->string) somewhere, (continued)
- Re: [Chicken-users] Adding (system->string) somewhere, Ozzi, 2008/01/14
- Re: [Chicken-users] Adding (system->string) somewhere, Kon Lovett, 2008/01/14
- Re: [Chicken-users] Adding (system->string) somewhere, Zbigniew, 2008/01/14
- Re: [Chicken-users] Adding (system->string) somewhere, Elf, 2008/01/14
- Re: [Chicken-users] Adding (system->string) somewhere, Tobia, 2008/01/15
- Re: [Chicken-users] Adding (system->string) somewhere, Zbigniew, 2008/01/15
- Re: [Chicken-users] Adding (system->string) somewhere, Kon Lovett, 2008/01/15
- Re: [Chicken-users] Adding (system->string) somewhere, Zbigniew, 2008/01/15
- Re: [Chicken-users] Adding (system->string) somewhere, Kon Lovett, 2008/01/15
Re: [Chicken-users] Adding (system->string) somewhere, Zbigniew, 2008/01/14
- [Chicken-users] Re: Adding (system->string) somewhere,
Ivan Shmakov <=