Hello,
Can I use a GOTO statement in a script? If I run the code below I get an error that says GOTO not found - done:exit not found. I'm trying to use GOTO in a larger script when I want to branch around some code.
echo "line1"
if [ -z "$1" ]
then
GOTO done
else
GOTO done
fi
echo "line2"
done:exit
Can I use a GOTO statement in a script? If I run the code below I get an error that says GOTO not found - done:exit not found. I'm trying to use GOTO in a larger script when I want to branch around some code.
echo "line1"
if [ -z "$1" ]
then
GOTO done
else
GOTO done
fi
echo "line2"
done:exit