I am writing a script where the second parameter must be an integer, but I don't know how to check if a parameter is an integer or not.
if test $2 =~ "^[0-9]+$"
then
echo "\nNumero entero"
else
echo "\nError: El numero $2 no es un numero entero !!!\a"
fi