ref: 2ab39f5ee3ec52d097989ec8fecac0f6a7c12b16 dir: /Tools/Count.hs/
import System.Environment import Data.List main = do [pat, fn] <- getArgs file <- readFile fn let n = length $ filter (isPrefixOf pat) (tails file) print n