Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #269318

Re: How to run automatically a script as soon root login

From Mario Marietto <marietto2008@gmail.com>
Newsgroups linux.debian.user
Subject Re: How to run automatically a script as soon root login
Date 2024-05-14 08:20 +0200
Message-ID <IDTG1-dest-1@gated-at.bofh.it> (permalink)
References <IDpoB-cVxq-1@gated-at.bofh.it> <IDwzL-d02T-1@gated-at.bofh.it> <IDCc9-d3EM-1@gated-at.bofh.it> <IDGSu-d6rs-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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 <seldon@eskimo.com> wrote:

> Nobody has yet applauded this glorious implementation
> of the 1960s GOTO statement in *Bash*?!
>
> * Mario Marietto <marietto2008@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.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: How to run automatically a script as soon root login Will Mengarini <seldon@eskimo.com> - 2024-05-13 18:50 +0200
  Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-14 08:20 +0200
    Re: How to run automatically a script as soon root login <tomas@tuxteam.de> - 2024-05-14 08:50 +0200
    Re: How to run automatically a script as soon root login Greg Wooledge <greg@wooledge.org> - 2024-05-14 13:10 +0200
      Re: How to run automatically a script as soon root login Greg Wooledge <greg@wooledge.org> - 2024-05-14 13:20 +0200
        Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-14 15:00 +0200
          Re: How to run automatically a script as soon root login Greg Wooledge <greg@wooledge.org> - 2024-05-14 17:00 +0200
      Re: How to run automatically a script as soon root login Mario Marietto <marietto2008@gmail.com> - 2024-05-14 13:20 +0200

csiph-web