Re: [dev] Shell style guide

From: Thomas Levine <__AT_thomaslevine.com>
Date: Tue, 06 Sep 2016 15:51:55 -0400

#!/usr/bin/env bash is necessary if you are using bash. But don't use
bash.

Here are some useful references on sh.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html
http://blackskyresearch.net/shelltables.txt
http://blackskyresearch.net/try.sh.txt

Adherence to standards and legibility can be problematic if you care
about
portability to sucky systems and shells. For example, `...` is more
widely
supported than $(...). But in the case of stali, I suggest that non-suck
should
take priority over portability.

Many portability issues come about from slight differences in utilities
on different
operating systems. Here are some notes on utilities that I have had
issues with.
http://src.thomaslevine.com/urchin/info/023e8abd7758b6c1b92e5dcfbcf620a2e48b6989?txt=1&ln=532-600
Received on Tue Sep 06 2016 - 21:51:55 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 06 2016 - 22:00:19 CEST