# http://c2.com/doc/SignatureSurvey/ require 'find' def file_text file_name IO.read(file_name).scan(/[{};]/).join rescue "error in file" end puts Find.find(File.expand_path(ARGV[0] || ".")) .grep(/\.[ch]$/) .map {|fn| "#{fn}:\n#{file_text(fn)}\n" } .join($/)