Source code:
#!/bin/bash
echo "Parametro is $1"
if [ $1 -gt 9 ]
then
echo "entre al if";
fi
echo"Fin del script";
My bash file has execute permission:
-rwxrwxr-x 1 mzadmin mzadmin 108 Feb 15 13:07 test.sh
I run my bash file like:
bash test.sh 9
And the output is:
Parametro is 9
test.sh: line 8: syntax error: unexpected end of file.