set -e (was: RHEL-CentOS conversion scripts (was Re: apache?))

Ben Scott dragonhawk at gmail.com
Fri Apr 10 14:12:32 EDT 2009


On Fri, Apr 10, 2009 at 1:47 PM, Kevin D. Clark
<kevin_d_clark at comcast.net> wrote:
>> You will see each command echoed before it is executed
>
> I have not looked at your scripts, but this reminds me of one of the
> things that I am enthusiastic about:  "set -e" in shell scripts.

  There are also bash options which will do things like echo commands
before executing them.  The one I remember off the top of my head is
"bash -x script", which gives you debugging tracing on everything.  I
seem to recall there are ways to tweak that output to make it more
useful and less "gobs of debugging information".

  So, yeah, bash can save a lot of work when it comes to
debugging/tracing scripts.

-- Ben



More information about the gnhlug-discuss mailing list