Bug in ghc-502 with system "cmd > tmp"?
Reuben Thomas
rrt at sc3d.org
Mon Oct 15 05:26:49 EDT 2001
> I have the following problem on Windows NT using ghc 5.02 from a cygwin
> bash-shell. Calls to System.system of the form
>
> system $ "grep -E " ++ show str ++ " " ++ file ++ " > tmp"
>
> do not work because of the ">" (ditto with "<"). Execution yields:
>
> grep: >: No such file or directory
This is because GHC uses Windows's system(), which always uses cmd.exe (or
command.com) to execute the command line (it doesn't check the setting of
SHELL). Perhaps the Hugs one adds that functionality back in. You need to
use
system $ "[ba]sh -c grep -E " ...
--
http://sc3d.org/rrt/ | The only person worth beating is yourself
More information about the Glasgow-haskell-bugs
mailing list