I have the following string, in this example there are 4 rows, but there could be more:
port device name profile settings
==== ====== ============= ======= =================
1 ttyS1 name1 cas 9600 8N1 ssh none
2 ttyS2 name2 cas 9600 8N1 ssh none
3 ttyS3 name3 cas 9600 8N1 ssh none
4 ttyS4 name4 cas 9600 8N1 ssh none
Press any key to continue...
And I need to get data only from the port and name columns, and assign it to an array of arrays, or several arrays.
e.g.
['1', 'name1']
['2', 'name2']
['3', 'name3']
['4', 'name4']
or
[['1', 'name1'],['2', 'name2'],['3', 'name3'],['4', 'name4']]
Could anyone give me any ideas on how could this be accomplished?