Hello All,
I have a need to build a dynamic menu based on the values of a csv file.
For example, lets say my file looks like this:
a,aa,abc,1.1.1.1 a,aa,abd,2.2.2.2 a,ab,abc,3.3.3.3 b,bb,bcd,4.4.4.4 b,bb,bce,5.5.5.5 b,bc,bcf,6.6.6.6 c,cc,cde,7.7.7.7 c,cc,cdf,8.8.8.8 c,cd,cfg,9.9.9.9
I want the menu to read the first column of each row and make on entry menu for each item. So it would look like this:
1) a 2) b 3) c
Then the user would choose one of the items and it would move over to column two, where it would look like this if (b) was chosen:
1) bb 2) bc
Then again if (bb) was chosen, it would display this:
1) bcd 2) bce
Finally, if if the user chose bcd, the script would launch an ssh session to 4.4.4.4 as that is the last column in the file.
Hopefully this makes sense and I'm not way off base with my thoughts here.
Thanks in advance!! Kelly
|