Nobody can show a different way,a modern way, for creating my script ? Why
did I feel so comfortable by recreating the 1960s GOTO statement in Bash ?

On Mon, May 13, 2024 at 6:30 PM Will Mengarini <sel...@eskimo.com> wrote:

> Nobody has yet applauded this glorious implementation
> of the 1960s GOTO statement in *Bash*?!
>
> * Mario Marietto <marietto2...@gmail.com> [24-05/13=Mo 13:37 +0200]:
> > function jumpto
> > {
> >         label=$1
> >         cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 | grep -v ':$')
> >         eval "$cmd"
> >         exit
> > }
>
> Anyway, Marietto, you've got two typi:
>
> > mid :
> That should be "mid:".
>
> > jump foo
> That should be "jumpto foo".
>
> Once you've got your root-login script working, I hope you
> move on to implementing a complete open-source PL/I compiler.
>


-- 
Mario.

Reply via email to