On Tue, Sep 30, 2008 at 2:32 AM, Timothy Goddard [EMAIL PROTECTED] 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.)
[EMAIL PROTECTED]:~/$ echo foo barbaz
foo
Svein Ove Aas [EMAIL PROTECTED] writes:
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.
...as long as the words don't contain quotes, or wildcard/globbing
characters, or $, ! and probably other
On Tue, Sep 30, 2008 at 10:14:38AM +0200, Ketil Malde wrote:
Svein Ove Aas [EMAIL PROTECTED] writes:
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.
...as long as the words don't contain
On Tue, 2008-09-30 at 18:33 +0200, Ketil Malde wrote:
David Roundy [EMAIL PROTECTED] writes:
Actually, it's no problem having any of those characters in your
arguments,
My point is that using 'words' on the argument sting to 'runProcess' and
expecting the same result as 'runCommand'
On Tue, 2008-09-30 at 09:30 -0700, Jonathan Cast wrote:
On Tue, 2008-09-30 at 18:33 +0200, Ketil Malde wrote:
David Roundy [EMAIL PROTECTED] writes:
Actually, it's no problem having any of those characters in your
arguments,
My point is that using 'words' on the argument sting to
On Tue, Sep 30, 2008 at 06:33:52PM +0200, Ketil Malde wrote:
David Roundy [EMAIL PROTECTED] writes:
Actually, it's no problem having any of those characters in your
arguments,
My point is that using 'words' on the argument sting to 'runProcess' and
expecting the same result as
David Roundy [EMAIL PROTECTED] writes:
Actually, it's no problem having any of those characters in your
arguments,
My point is that using 'words' on the argument sting to 'runProcess' and
expecting the same result as 'runCommand' implies making those assumptions::
Prelude System.Process let
how about using a wrapper script, to which you would supply the value as
parameter
so you would just use runCommand thescript envval rest of parameters ?
Herein lies the problem: I have a program that accepts complete commands
from a file and executes them. It works perfectly. And now I'd just
Quoth David Roundy [EMAIL PROTECTED]:
...
| My point was that which of these is correct entirely depends on what
| your input is. It's often a huge (and security-bug-prone) chore to
| escape all those shell characters, and so in many cases it's much
| nicer to execute an external program direcly
Much hair-pulling resulted today when I attempted to perform a small task.
The System.Process module provides the runCommand function. This takes a
complete command line and returns a ProcessHandle. No problem there.
The module also provides the runProcess function, which enables you to
set
On Sep 29, 2008, at 15:49 , Andrew Coppin wrote:
Herein lies the problem: I have a program that accepts complete
commands from a file and executes them. It works perfectly. And now
I'd just like to set an environment variable while each command
runs... But alas no, the only way to do that
Brandon S. Allbery KF8NH wrote:
On Sep 29, 2008, at 15:49 , Andrew Coppin wrote:
Herein lies the problem: I have a program that accepts complete
commands from a file and executes them. It works perfectly. And now
I'd just like to set an environment variable while each command
runs... But alas
On Sep 29, 2008, at 15:59 , Andrew Coppin wrote:
Brandon S. Allbery KF8NH wrote:
On Sep 29, 2008, at 15:49 , Andrew Coppin wrote:
Herein lies the problem: I have a program that accepts complete
commands from a file and executes them. It works perfectly. And
now I'd just like to set an
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.)
[EMAIL PROTECTED]:~/$ echo foo barbaz
foo bar baz
Echo doesn't receive special treatment. It joins its arguments with
14 matches
Mail list logo