Sujet : Re: Which shell and how to get started handling arguments
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shellDate : 17. Apr 2024, 11:02:36
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <uvo37c$3ss73$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
uvn6ga$17j5g$3@dont-email.me>,
Lawrence D'Oliveiro <
ldo@nz.invalid> wrote:
On Tue, 16 Apr 2024 11:11:16 -0000 (UTC), Christian Weisgerber wrote:
>
On 2024-04-15, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
There is a tool ...
>
Or just use a basic POSIX shell. Such things exist, you know.
>
... ShellCheck that among other things can be used to warn
about unportable code in shell scripts. https://www.shellcheck.net/
>
I dont see any mention of unportability, only about bugs.
ShellCheck reads the #! line and figures out which flavor of shell you are
using, but this can be overridden by a command line switch. So, presumably,
you could tell it to parse your batch script as if it were plain old
"POSIX" (i.e., crippled) sh.
Just for fun, I tried this:
...
I would have to count every single one of those messages as spurious.
Yes, ShellCheck complains about a lot of things, and most of its complaints
can and should be ignored. I still find it interesting and useful, but you
have to take (most of) what it says with a (big) grain of salt.
-- The randomly chosen signature file that would have appeared here is more than 4lines long. As such, it violates one or more Usenet RFCs. In order to remainin compliance with said RFCs, the actual sig can be found at the following URL: http://user.xmission.com/~gazelle/Sigs/WeekendAwayFromHome