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

2009-06-20 Thread Alan Johnson
On Fri, Apr 10, 2009 at 7:12 PM, Michael ODonnell < michael.odonn...@comcast.net> wrote: > > > > the basic echoing of commands that I know is out there some where > > would make my scripts way more professional. Anyone know that? > > Not quite sure what you're referring to but between bash's -x a

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

2009-04-10 Thread Michael ODonnell
> the basic echoing of commands that I know is out there some where > would make my scripts way more professional. Anyone know that? Not quite sure what you're referring to but between bash's -x and -v options you will probably get as much chatty output as you could ever want. If you remember n

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

2009-04-10 Thread Alan Johnson
On Fri, Apr 10, 2009 at 1:47 PM, Kevin D. Clark wrote: > Here is the Bash documentation for "set -e": > I frequently write industrial strength shell scripts, and I nearly > always put "set -e" at the top. I would humbly suggest for those > people on this list who are not experts at creating shell

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

2009-04-10 Thread Michael ODonnell
> one of the things that I am enthusiastic about: set -e" I like that one, too, and I also like the way bash allows you to trap on error conditions, thusly: #!/bin/bash function errHandler() { echo 'errHandler activated' } trap errHandler ERR echo Ready for firs

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

2009-04-10 Thread Ben Scott
On Fri, Apr 10, 2009 at 1:47 PM, Kevin D. Clark 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

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

2009-04-10 Thread Kevin D. Clark
Alan Johnson writes: > At first, my scripting may be a bit confusing because I am very verbose for > debuggin purposes, and I expect this kind of script is always going to need > debugging. You will see each command echoed before it is executed in an if > statement so that it only conitues to th