>>>  More than anyone wanted to know!  ??
Well, no - it is just what I wanted to know, only it's a bit too late.
The recent Debian 12 upgrade broke an embarrassingly large fraction of my 
cron scripts. Even though the scripts were #!/bin/sh, the bashisms were 
still working, so I had assumed they were posix-compatible.
Those links look like something I should investigate, thank you.
Cameron.

On Tuesday, 12 September 2023 at 12:33:33 pm UTC+10 Nate Bargmann wrote:

> * On 2023 11 Sep 20:50 -0500, gary....@gmail.com wrote:
> > How's this related to WeeWX? I use a systemd timer to backup the 
> database. 
> > That one works a treat as I used bash, not sh
>
> It really depends on the distribution. Some use Bash as the login and
> system shell by symlinking it to /bin/sh. When called as 'sh' Bash
> mostly restricts itself to POSIX defined sh behavior. So-called
> Bashisms (Bash extensions to sh grammar) are turned off and scripts
> written to take advantage of Bashisms will have errors.
>
> Several releases ago Debian went one step further and set dash (Debian
> Almquist Shell) as the default system shell as noted:
>
> https://wiki.debian.org/Shell
>
> Converting a script with Bashisms to dash (sh) can be trivial or not.
> To aid in that process Debian offers checkbashisms:
>
> https://manpages.debian.org/bookworm/devscripts/checkbashisms.1.en.html
>
> Debian's choices filter down to Raspberry Pi OS and other derivatives
> such as Armbian and Ubuntu flavors..
>
> It is up to the script author/maintainer/distribution which shell to
> support. Some distributions have their system shell scripts written
> with the #!/bin/bash shebang. It is worth noting that beginning with
> Debian 12 (Bookworm) Bash can no longer be set as the system shell
> by running 'dpkg-reconfigure dash'. Of course manually editing the
> symlink can be done but there may be unexpected results with system
> scripts now written for Dash.
>
> More than anyone wanted to know!
>
> - Nate
>
> -- 
> "The optimist proclaims that we live in the best of all
> possible worlds. The pessimist fears this is true."
> Web: https://www.n0nb.us
> Projects: https://github.com/N0NB
> GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ebec42ce-240e-4c4d-a27d-95ddca6f7b2en%40googlegroups.com.

Reply via email to