Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #269326
| 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 13:20 +0200 |
| Message-ID | <IDYml-dhg4-3@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <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> <IDYcG-dhcD-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Your answer does not help me to understand how to use a "structured programming / if , while, for, functions" for the specific task that I want to achieve. I failed using "your" lovely structured programming and that's the reason why I'm asking for some hint to understand why and how I can use it. Your answer puts the finger on the spot and isn't helpful, also because it says things that I already knew. On Tue, May 14, 2024 at 1:03 PM Greg Wooledge <greg@wooledge.org> wrote: > 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). > > -- Mario.
Back to linux.debian.user | Previous | Next — Previous 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