Skip to content

Instantly share code, notes, and snippets.

@chetan
Created April 13, 2014 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chetan/10586285 to your computer and use it in GitHub Desktop.
Save chetan/10586285 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
lines = STDIN.readlines.map{ |s| s.strip.downcase }
# lines = File.read("files.txt").split(/\n/).map{ |s| s.downcase }
files = {}
lines.each{ |s| files[s] = 1 }
lines.each do |s|
if s =~ /^(.*?)\.jn1$/ then
f = $1
if !files.include?(f) then
puts "#{f}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment