Hi folks,
I'm using an array (set -A) to store a list of all available LPARs using certain HMC. Note: The number of entries in this array keeps changing as we're "constantly" adding and removing LPARs from the HMC.
Let's say the array content looks something like this:
Now what I'd like to accomplish is the following:
Read the array and create an output like this:
So he's supposed to automatically generate automatically increasing leading numbers (Sorry for my english, hope you know what I want so say !).
AND it's supposed to be possible to enter 1, 2, 3, 4 or 5 in order to run commands using the specified entry as a variable.
e.G.
... after entering the "1"
Another important point is that the above output is NOT supposed to look like this:
There are supposed to appear up to 3 entries in every line ...
Any idea how this could be accomplished ?
Regards
Thomas
I'm using an array (set -A) to store a list of all available LPARs using certain HMC. Note: The number of entries in this array keeps changing as we're "constantly" adding and removing LPARs from the HMC.
Let's say the array content looks something like this:
Code:
Machine_A
Machine_B
Machine_C
Machine_D
Machine_E
Now what I'd like to accomplish is the following:
Read the array and create an output like this:
Code:
1) Machine_A | 2) Machine_B | 3) Machine_C
4) Machine_D | 5) Machine_E
Please make a choice:
So he's supposed to automatically generate automatically increasing leading numbers (Sorry for my english, hope you know what I want so say !).
AND it's supposed to be possible to enter 1, 2, 3, 4 or 5 in order to run commands using the specified entry as a variable.
e.G.
Code:
command Machine_A
... after entering the "1"
Another important point is that the above output is NOT supposed to look like this:
Code:
1) Machine_A
2) Machine_B
3) Machine_C
...
There are supposed to appear up to 3 entries in every line ...
Any idea how this could be accomplished ?
Regards
Thomas