Skip to content

Instantly share code, notes, and snippets.

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