[Haskell-cafe] How to add ENV variable in runhaskell shell script

John Meacham john at repetae.net
Mon Jan 14 06:20:37 EST 2008

only one argument is allowed after the #! on the first line. however the
following should be portable if you must set the variable before
runhaskell is executed:

-- > /dev/null 2>&1; MYENV=foo runhaskell $_  

import System.Environment

main = getEnv "MYENV" >>= print

John Meacham - ⑆repetae.net⑆john⑈

More information about the Haskell-Cafe mailing list