module Main(main) where import Shell(launch) import System.IO (IO, hPutStr, hGetContents, hFlush, hClose) --Any number higher than this will not work ;-) maxBufferStore :: Int maxBufferStore = 1024*8 main :: IO () main = do (input,output,_) <- launch "cat" ["cat", "-n"] out <- hGetContents output hPutStr input $ replicate maxBufferStore 'a' hFlush input hClose input putStr out