[nycbug-talk] nifty(1)

Matthew Story matt at tablethotels.com
Thu Dec 15 00:54:24 EST 2011


i believe the most portable version is slightly uglier:

On Dec 14, 2011, at 6:13 PM, Isaac Levy wrote:

>  shout() { echo "$0: $*" >&2; }
>  barf() { shout "$*"; exit 111; }
safe() { ${1+"$@"} || barf "cannot $*"; }
          ^^^^^^^^ this bit is more reliable for sh on Solaris (real Bourne shell)

you can install the shells/heirloom-sh package from ports (it installs as `jsh') for `compatibility' testing, I believe Bourne shell is typically considered the most
restrictive of the POSIX shells (although i believe it is not technically compliant with IEEE Std 1003.2 (``POSIX.2'') ... neither is FreeBSD shell, although it is closer).

> 
> I use these daily, they're extremely cross-platform friendly in any bourne-derived shell I've  used in the last 3 years.
> 




More information about the talk mailing list