interact

interact :: (String -> String) -> IO ()
base Prelude, base System.IO
The interact function takes a function of type String->String as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.
interact :: (ByteString -> ByteString) -> IO ()
bytestring Data.ByteString, bytestring Data.ByteString.Char8, bytestring Data.ByteString.Lazy, bytestring Data.ByteString.Lazy.Char8
The interact function takes a function of type ByteString -> ByteString as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.
interact :: (Text -> Text) -> IO ()
text Data.Text.Lazy.IO
The interact function takes a function of type Text -> Text as its argument. The entire input from the standard input device is passed (lazily) to this function as its argument, and the resulting string is output on the standard output device.
interact :: (Text -> Text) -> IO ()
text Data.Text.IO
The interact function takes a function of type Text -> Text as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.
package combinator-interactive
package
runInteractiveCommand :: String -> IO (Handle, Handle, Handle, ProcessHandle)
process System.Process
Runs a command using the shell, and returns Handles that may be used to communicate with the process via its stdin, stdout, and stderr respectively. The Handles are initially in binary mode; if you need them to be in text mode then use hSetBinaryMode.
runInteractiveProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> IO (Handle, Handle, Handle, ProcessHandle)
process System.Process
Runs a raw command, and returns Handles that may be used to communicate with the process via its stdin, stdout and stderr respectively. For example, to start a process and feed a string to its stdin: > (inp,out,err,pid) <- runInteractiveProcess "..." > forkIO (hPutStr inp str) The Handles are initially in binary mode; if you need them to be in text mode then use hSetBinaryMode.