bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error handling question


From: Sven Mascheck
Subject: Re: Error handling question
Date: Mon, 9 Nov 2009 20:37:28 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Mon, Nov 09, 2009 at 09:10:02AM -0500, Greg Wooledge wrote:
> On Mon, Nov 09, 2009 at 03:49:09PM +0200, Ciprian Dorin, Craciun wrote:

> >     P.S.: The fact that some features of Bash, mainly `set -e`, which
> > should be a safety-net for scripts, is "unpredictable" is not so very
> > reassuring...

Demand for this safety-net might be obvious, but I suppose too few are
using it regularly?  There are places where you have to ignore a failing
command (simple example: in test conditions) and the more subtle cases
apparently never were really recognized (let alone settled on)?  See a
comparison among various shells: http://www.in-ulm.de/~mascheck/various/set-e/



And discussing a more offtopic-lke part:

> [...] practice of using the absolute lowest common denominator
> feature set in order to make your script run everywhere.

Huh, that's fundamental decisions in a casual sentence.
Yes, the lowest common denominator is quite traditional, but I believe
the real decision is to find out what amount of portability you actually
need.


> With Solaris still shipping a Bourne shell (rather than a POSIX shell)
> in /bin/sh that means you're stuck with 7th Edition semantics unless
> you're willing to put in tricks to try to re-invoke your script under
> /usr/xpg4/bin/sh or /bin/sh5 or ksh or bash or whatever.

Such dicussions are a mine field.  But I believe here you are really
confusing Solaris (quite recent SVR4-like shell) with Ultrix (sh: V7-like
shell without functions ./. sh5: SVR2-like shell).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]