findStrb :: String -> String -> BoolfindStrb key str = if key `isInfixOf` str then True else FalseprintList :: [String] -> IO ()printList (x:xs) = doputStrLn xprintList xsmain :: IO ()main = doinfile <- readFile "ec2_list"printList [x | x <- lines infile, findStrb "kernel" x]
No comments:
Post a Comment