[Haskell-cafe] System.Process
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Mon Sep 29 16:11:56 EDT 2008
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 environment variable while each
>>> command runs... But alas no, the only way to do that is with
>>> runProcess, which expects me to parse the command line first.
>>> (Before anybody remarks that "words" will do this, consider the
>>> "echo" command, which treats whitespace meaningfully.)
>>
>> env FOO=bar mycommand ...
>
> Does that work for Windows?
Only if on of the unix-simulation environments is installed. I
wouldn't want to bet on such things working reliably cross-platform
anyway; even if it works something like the same way, the variable
names are usually different.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe
mailing list