On 6/17/24 6:34 PM, Steve Nickolas wrote:
On Mon, 17 Jun 2024, Stuff Received wrote:
On 2024-06-16 21:25, Larry McVoy wrote (in
part):
[...]
*Every* time they used some bash-ism, it bit us
in the ass.
This is so true for a lot of OS projects (on Github, for example). Most
-- sometimes all -- the scripts that start with /bin/sh but are full of
bashisms because the authors run systems where /bin/sh is really bash.
Which is why I'm glad Debian's /bin/sh is dash (fork of ash) instead.
Like everything else, it depends on your goals. If portability across
different OSs is a goal, and you can't be guaranteed that bash will be
available, it's best to stick with POSIX features. If you want to run
places where you can be guaranteed that bash exists, use whatever
`bashisms' you like and use `#! /bin/bash'.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet(a)case.edu
http://tiswww.cwru.edu/~chet/