Skip to content

Instantly share code, notes, and snippets.

@monkieboy
Created July 28, 2015 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monkieboy/6e457c8428bb2d6875ba to your computer and use it in GitHub Desktop.
Save monkieboy/6e457c8428bb2d6875ba to your computer and use it in GitHub Desktop.
let logFiles = System.IO.Directory.GetFiles("C:\\temp\\logs")
// foreach logfile i want to scan each line and match and select lines containing '9'
let selected =
logFiles
|> Array.map System.IO.File.ReadAllLines
let collected =
selected
|> Array.collect id
|> Array.filter (fun line -> line.Contains " 9 ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment