-
TEST 2Scritto daNon Autenticatoil 2008-10-18 23:20:00.0 alle 2008-10-18 23:20:00.01
2 found_files = Dir.glob( ARGV[0] + "/**/*.rb")
3 serach_pattern = Regexp.new( ARGV[1] )
4 for entry in found_files
5 file = File.new(entry,"r")
6 line_count=0
7 file.readlines.each { |line|
8 line_count+=1
9 puts "#{entry}[#{line_count}]:#{line}" if serach_pattern.match(line)
10 }
11 end
-
Re: TEST 2Scritto daNon Autenticatoil 2008-10-18 23:24:00.0 alle 2008-10-18 23:24:00.0
- Scritto da:
> 1
> 2 found_files = Dir.glob( ARGV[0] +
> "/**/*.rb")
> 3 serach_pattern = Regexp.new( ARGV[1] )
> 4 for entry in found_files
> 5 file = File.new(entry,"r")
> 6 line_count=0
> 7 file.readlines.each { |line|
> 8 line_count+=1
> 9 puts "#{entry}[#{line_count}]:#{line}" if
> serach_pattern.match(line)
> 10 }
> 11 end
fail
-