file = "/etc/passwd" lineCount s = length (lines s) charCount s = length s main = do x <- readFile file putStrLn (show (lineCount x) ++ " lines") putStrLn (show (charCount x) ++ " characters")