Liste des Groupes | Revenir à cu shell |
On 2024-04-15, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:Bash has an option that tells it to (attempt to) restrict itself to>
POSIX semantics:
No, it does not:
>Starting Bash with the '--posix' command-line option or executing^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'set -o posix' while Bash is running will cause Bash to conform more
closely to the POSIX standard by changing the behavior to match that
specified by POSIX in areas where the Bash default differs.
>
This only tweaks bash's behavior where it otherwise differs from
POSIX. It does not disable the myriad extensions.
There is a tool ShellCheck that among other things can be used to
warn about unportable code in shell scripts.
https://www.shellcheck.net/
>
I haven't used it myself yet. It is written in Haskell, so it
suffers itself from portability concerns.
Les messages affichés proviennent d'usenet.