BASH alias not working...

Colin Watson cjwatson at ubuntu.com
Tue Jun 21 08:22:53 UTC 2005


On Mon, Jun 20, 2005 at 08:38:49PM -0400, Byron Saltysiak wrote:
> On 6/20/05, Colin Watson <cjwatson at ubuntu.com> wrote:
> > When writing reliable scripts, using 'set -e' at the top of your script and
> > explicitly ignoring the exit status of the commands you don't care about
> > (using '|| true' or whatever) is better than relying on yourself to
> > notice when commands are important enough to need checking.
> 
> Sounds like a good idea. Do you have an example script that I could look at?

Debian policy strongly suggests 'set -e', so many shell scripts on your
system ought to do. /usr/sbin/base-config is the first example that
comes to mind.

-- 
Colin Watson                                       [cjwatson at ubuntu.com]




More information about the ubuntu-users mailing list