I am learning bash script and made this script :
#!/bin/bash
PS3='What is your distro: '
options=("Fedora" "Ubuntu" "Arch" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Option 1")
echo "you chose Fedora"
;;
"Option 2")
echo "you chose Ubuntu"
;;
"Option 3")
echo "you chose Arch $REPLY which is $opt"
;;
"Quit")
break
;;
*) echo "invalid option $REPLY";;
esac
done
I want to execute a command if I select an option for example Fedora ==> Fedora.sh
I hope someone helps me.
echo "you chose Fedora"with/path/to/Fedora.sh?