'Passing contents of CSV file to script function as arguments using Ruby
I created a CSV file, no headers, two columns per row. I.e.:
ARG001,ARG001a
ARG002,ARG002a
ARG003,ARG003a
I can read it and print out a specific row of the array:
require 'csv'
data = CSV.read("recTest.csv")
print data[0]
With my output looking like this:
["ARG001", "ARG001a"]
What I am trying to do is pass as many rows of data to a function that'll use them within the query string of a URL. I.e.:
start firefox https://desiredSite.com/status?queryStringArg1=ARG001&querySTringArg2=ARG001a
Extremely new with Ruby, any help would be great. Thx in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
