2008/9/18 <[EMAIL PROTECTED]>: > ---- Ishan Arora <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Thanks for the reply. I tried system. It calls the code synchronously, and >> returns a number for success or failure of the command. Is there a way such >> that the stdout output of the command is returned as a string? Thanks again. > > Try open-input-pipe in the (ice-9 popen) module.
That is indeed the best way, with an up to date Guile. In case you're stuck with an old one (1.6.x, I think) where open-input-pipe isn't reliable, you can work around that by doing something like this: (system "your-command-here > temp-file.txt") (with-input-from-file "temp-file.txt" read-line) Neil