-
-
Save scott2619/9a8b0af0db5f628e2d52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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