I am trying to do something similar to this question: Parse a CSV file, update a field, then save
Essentially I have a CSV with each line having a comma separated list of IPs, each row represents a different IP group. I pass this CSV to a function that does some work on each IP per row. After that I want to append a status and timestamp to the line. The solution above requires the creation of a second file, is there a way to do this without creating the additional file, just appending to each row in place?
CSV.open('csv_with_ips.csv', 'r+').each do |row|
<do some stuff>
row << 'SCANNED'
row << Time.now
end