I'm trying to write a script where the list choice is configurable with the for loop:
list1="name1 name2" list2="name3 name4" echo "which list do you want to use? (list1 or list2)" read userInput for item in $userInput do ....
This isn't working. I also tried this below, but no luck either.
for item in $($userInput)