Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #269322
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: How to run automatically a script as soon root login |
| Date | 2024-05-14 13:10 +0200 |
| Message-ID | <IDYcG-dhcD-11@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> <IDTG1-dest-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 14, 2024 at 08:09:18AM +0200, Mario Marietto wrote: > 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 ? I have absolutely no clue what you're trying to do or why you're trying to do it, but I *promise* you, whatever you think you're doing, you have NOT recreated a GOTO statement in bash. You showed a function. Functions can be called. This is NOT the same as issuing a GOTO command, because once the function returns, control flow resumes from the point where it was called. Bash (and sh, on which bash is based) explicitly chose not to have a GOTO statement in its language. The authors chose instead to use the control primitives that are collectively known as "structured programming" (if, while, for, functions).
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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