Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 16 lines (13 sloc) 0.426 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/ruby

file = ARGV[0]

File.read(file).each do |line|
  line.chomp!
  begin
    call_number = (/.* \$a (.*)[$\s]/.match(line))[1]
    call_number.gsub!(/[A-Za-z\/].*/, '') # Remove any letters and slashes (/)
    puts call_number if call_number.to_i < 1000 && call_number.length > 0
  rescue Exception => e
    # Uncomment to see the call numbers that aren't Dewey
    # STDERR.puts "(Error #{e}) #{line}"
  end
end
Something went wrong with that request. Please try again.