Skip to content

Instantly share code, notes, and snippets.

@scott2619
Created March 2, 2016 15:46
Show Gist options
  • Save scott2619/9a8b0af0db5f628e2d52 to your computer and use it in GitHub Desktop.
Save scott2619/9a8b0af0db5f628e2d52 to your computer and use it in GitHub Desktop.
keywords = File.open('keywords.txt', 'r+')
prnums = File.open('prods.txt', 'r+')
prnums.lines.each do |line|
cells = line.split(",")
prnum = cells.first
description = cells.last
keywords.lines.each do |keyword|
if description.include? keyword
puts prnum
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment