array=('org.battery.plist' 'org.disk.plist' 'org.memory.plist');
echo "1) org.battery.plist"
echo "2) org.disk.plist"
echo "3) org.memory.plist"
echo "Enter selection(s) to load, separated by commas: "
read var
sudo launchctl load -w ${array[$var]}
Am I on the right track? I'm a little stuck. Can someone help?
If user inputs 1, 2, I expect the script to perform this below -
sudo launchctl load -w org.disk.plist
sudo launchctl load -w org.memory.plist
select ... in ...
statement inbash
. typehelp select
in the terminal for help. – kev May 1 at 23:51