Is there a Unix (Solaris v8 ksh) version of the old basic command gosub or goto? I've researched the return command, but can't identify the command to return from. I am not trying to return from a function. Can someone give me a basic understanding of this please? Thanks so much in advance for any help.
Most of the time when I need "goto" functionality in ksh, I do something like this:
function foo
{
# Assume a successful exit code
typeset RC=0
# Create a cheesy, endless loop
while :
do
...
if [ some test condition]
then
# Set some flag if necessary
RC=1
break
fi
# Don't want any more loop iterations
break
done
return ${RC}
}