#!/usr/bin/env ruby #todo: http://www.rubycentral.com/book/taint.html require 'find' testroot='http://www.w3.org/2000/10/rdf-tests/rdfcore/' localroot='rdf-testcases/' Find.find('rdf-testcases') do |f| next unless f =~ /\.nt$/ uri = f.gsub localroot,testroot puts "Got: #{uri}" # OK, how to do this in pure ruby? data,retcode=system("awk '/^[ \t]*(#.*)?$/ { next; } { print $0; } ' #{f} | wc -l") data.each do |x| puts "X: #{x}" end end