[Haskell-cafe] System.Process

Svein Ove Aas svein.ove at aas.no
Tue Sep 30 03:37:09 EDT 2008

On Tue, Sep 30, 2008 at 2:32 AM, Timothy Goddard <tim at goddard.net.nz> wrote:
> On Tue, 30 Sep 2008 08:49:44 Andrew Coppin wrote:
>> Before anybody remarks that "words" will do this, consider the "echo"
> command, which treats whitespace meaningfully.)
> tim at florida:~/$ echo foo  bar            baz
> foo bar baz
> Echo doesn't receive special treatment. It joins its arguments with spaces.
To clarify, the shell is what's responsible for splitting the argument
line; the argument array you'd pass to runProcess is what the process
would literally get, but if you use runCommand it gets passed to the
shell for splitting first.

All programs want argument arrays, not un-split lines, and if you
don't have the shell split it you'll have to do it yourself. words
works fine.

More information about the Haskell-Cafe mailing list