i want to count the occurence of a searchstring in all files
below a directory and all its subdirectories
i have =
Dir.glob(“E:/test/foobar/scripts//.xml”).each do |f|
matches += File.new(f).read.scan(’’).size
puts "Matchcount == " + matches.to_s
puts "Scanned Files == " +
Is there a better way ?