I need an important help with my bash code, I have been in this state like this for 1 hour and I did not get anywhere, I solved the end of code error, but now I am in that and I am not able to advance, prove changing elif by else if but still I did not find a solution help! Thanks.
Error code: line 39 (19 after edit): syntax error near unexpected token `elif'
echo -e '\e[31m[ 1 ] Instalar paquetes\e[1m'
sleep 0.1
echo -e '\e[31m[ 2 ] Instalar Herramientas\e[1m'
sleep 0.1
echo -e '\e[31m[ 3 ] Eliminar Herramienta\e[1m'
sleep 0.1
echo -e '\e[31m[ 4 ] Info\e[1m'
sleep 0.1
echo -e '\e[31m[ 5 ] Salir\e[1m'
sleep 0.1
echo ' '
echo -e '\e[34mInserte la opción que desea utilizar:'
read vw
if [ $vw = 1 ];
then
sleep 1.3
echo 'Inserte el nombre del paquete que desea instalar ej.python'
read instalar
pkg install $instalar
elif [ $vw = 2 ];
then
sleep 1.3
bash tools.sh
fi
elif [ $vw = 3 ];
then
sleep 1.3
echo 'inserte el nombre de la herramienta que desea eliminar:'
read eliminar
rm -rf $eliminar
fi
elif [ $vw = 4 ];
then
sleep 1.3
echo 'Autor: '
fi
elif [ $vw = 5];
then
sleep 1.3
fi
else
echo 'Por favor inserte un numero del que se encuentra en la lista'
sleep 4
bash chesthacker.sh
exit 0
fi
fibeforeelifandelse. - Barmarfikeyword at the end of theif/elif/elsechain, not after each block. - Barmar;at the end of lines, but it's merely redundant, not an error. - Barmar