I am working on a mini software which will be written in BASH and I encountered a problem.
I want the program to do this:
Show a list of software (names);
Let you choose the software from the list
echo "$REPLY"
then
Code: Select all
git clone link
Code: Select all
PS3="Choose a software to download."
options=("1" "2" "3" "4" "5" "Quit")
select opt in "${options[@]}"
do
case $opt in
"1" )
echo "1"
;;
"2")
echo "2"
;;
"3")
echo "3"
;;
"4")
echo 4"
;;
"5")
echo "5"
;;
"Quit")
echo "Quit"
break
;;
*) echo "Invalid Option $REPLY";;
esac
done
I tried to add the [git clone] command using the && and || operators, the code was git clonning before the list even appeared.
How do I fix this mess of a code XD
Thanks in advance!!