From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 72CE1382BAD; Fri, 19 Feb 2021 21:07:12 -0500 (EST) Received: from hurricane.the-brannons.com (hurricane.the-brannons.com [216.252.162.32]) by befuddled.reisers.ca (Postfix) with ESMTPS id 25DF8380F3E for ; Fri, 19 Feb 2021 21:07:12 -0500 (EST) Received: from localhost ( [2602:3f:e0f9:dc00::2]) by hurricane.the-brannons.com (OpenSMTPD) with ESMTPSA id 3caad415 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Fri, 19 Feb 2021 18:07:08 -0800 (PST) From: chris@the-brannons.com To: Didier Spaier Cc: Glenn K0LNY , speakup@linux-speakup.org Subject: Re: announcing: Blind and Low Vision Unix Users Group References: <877dn3sse1.fsf@the-brannons.com> <00a601d706ff$f9682c60$6400a8c0@NUCPPYH> <871rdbsrhy.fsf@the-brannons.com> <111ec1c0-0a41-a76e-2a74-23039be8215e@slint.fr> Date: Fri, 19 Feb 2021 18:07:07 -0800 In-Reply-To: <111ec1c0-0a41-a76e-2a74-23039be8215e@slint.fr> (Didier Spaier's message of "Fri, 19 Feb 2021 22:41:39 +0100") Message-ID: <87eehbqypg.fsf@the-brannons.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 List-Id: Didier Spaier writes: > As an aside, when writing shell scripts I now use only syntactical > constructs > specified by POSIX, so that they be portable across OS. Building on your digression a bit: basically if a script has "#!/bin/sh" in the shebang line, it should only use constructs from POSIX sh. If it needs bash or something else, it is best to require that in the shebang line. Bash et al are insanely portable, so it's fine to require them. It's not fine to assume bash is /bin/sh, like so many Linux users did for years. There are some tools for detecting portability issues, namely shellcheck and checkbashisms. I use shellcheck because it's a general-purpose linter for shell that will find and flag all kinds of other issues, not just a tool to find nonportable constructs. -- Chris