Robert Love
4/25/2006 11:46:00 PM
This is my first ruby script. It does what I want but seems dead dog
slow compared to just using shell tools like "ls" and "grep". I will
expand its purpose later but for now I just want to look at all files in
a directory and identify those that have a certain CVS tag.
Please give me advice on how to speed it up using other techniques.
Thanks.
#!/home/u102k/bin/ruby -W0
target = Regexp.new('SR_048999')
Dir['*.f'].each do |zfile|
zline = `cvs log #{zfile}`.grep(target)
if zline.length != 0 then
printf("%s %s", zfile, zline)
end
end