Skip to content

Instantly share code, notes, and snippets.

@scott2619
Created March 2, 2016 15:46
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 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