Created
May 8, 2010 20:58
-
-
Save mausch/394771 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
let enumFiles = Seq.collect (fun p -> Directory.EnumerateFiles(".", p, SearchOption.AllDirectories)) | |
let procFile f = | |
printfn "%s" f | |
let lines = File.ReadLines f | |
|> Seq.map (fun l -> System.Text.RegularExpressions.Regex.Replace(l, "\r?\n", "\r\n")) | |
|> Seq.toArray | |
File.WriteAllLines(f, lines) | |
enumFiles ["*.cs"; "*.xml"; "*.config"] |> Seq.iter procFile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment