I've just started writing a script to read multiple files and save the data in different variables. More precisely, I have two different files containing one column of data each (both files equally many rows):
I want to read line by line in a for or while loop and save the corresponding row value in two different variables (that I will later use as input into another function). It would work something like, in "semi-code" =):
for i=1 to "number of rows in files"
variable1 = i:throw in file1
variable2 = i:th row in file2
I've managed to do what I want when just reading one file:
cat file1.dat | while read line
Any ideas how to transform this to reading multiple files at the same time? Thanks!