Reputation: 33
Imagine that I have compiled the file program.hs where:
main :: IO ()
main = do a <- getArgs
w <- getContents
...
My question is how can I run that program in the windows command line such that it receives input from file.txt?
Upvotes: 0
Views: 106
Reputation: 58929
Use the <
input redirection operator when running the program:
program otherargumentsgohere < inputfile.txt
Upvotes: 2