hi all,
I'm trying to resolve a scenario where we prompt the user to enter 1 or more disk names.
From there we would run a command on each disk which would give its location.
This would allow us to create a list of disks at location A, a list of disks at location B,....etc...
Any help on creating these multiple lists?
script would do something like:
Enter disk(s): disk1 disk2 disk3 disk4
# behind the scenes we would run something like
# get_location disk1 (for each disk)
# which returns something like NY, Florida, etc...
# would set up the unique lists here
# then give back to user
Disks disk1 disk2 are at location Florida
Disk disk3 is at location NY
Disk disk4 is at location Boston
Our scenerio is a little more complicated than this but I wanted to get it down to the most basic example I could to make the question easier to ask.
Any suggestion on how to build these unique lists in my shell script?
(sadly we can't use perl here as its cross platform...etc..)
thanks
Annie