Save textlines to respective variables
Posted: 18 Sep 2016 04:58
Hello!
I have a textfile called "abc.tmp" and it has 500 lines, in every line is one number.
I want every number to be saved in a variable that is respective to the line it got from, so:
These are the first 5 lines of "abc.tmp":
3
4
0
2
1
And I want the first line (3) to be saved to mvm1,
the second line (4) to be saved to mvm2,
the third line (0) to be saved to mvm3,
the fourth line (2) to be saved to mvm4,
the fifth line (1) to be saved to mvm5,
...
So that all 500 lines of the file are in mvm1 to mvm500. How can you do that?
I have a textfile called "abc.tmp" and it has 500 lines, in every line is one number.
I want every number to be saved in a variable that is respective to the line it got from, so:
These are the first 5 lines of "abc.tmp":
3
4
0
2
1
And I want the first line (3) to be saved to mvm1,
the second line (4) to be saved to mvm2,
the third line (0) to be saved to mvm3,
the fourth line (2) to be saved to mvm4,
the fifth line (1) to be saved to mvm5,
...
So that all 500 lines of the file are in mvm1 to mvm500. How can you do that?