[clue] seeking debugging advice
Chris Fedde
chris at fedde.us
Mon Mar 9 10:51:27 MDT 2015
I typically use 'set' and put each of the switches on it's own line. My
bash script template includes:
#!/bin/bash
#set -x
#set -v
set -a
set -e
set -u
Then I comment and uncomment as needed.
On Sun, Mar 8, 2015 at 10:40 PM, David L. Anselmi <anselmi at anselmi.us>
wrote:
> David L. Willson wrote:
> >
> > I use eu always, and x when I'm having problems.
>
> Yes, that's good. u helps you catch typos in variable names (that
> otherwise just expand to nothing).
>
> If you think there might be times when e stops your script and it
> shouldn't, you can always catch
> the error return and do the right thing from there. If you don't know
> what will cause an error or
> you don't know what the right thing is then exiting (via the e) is
> probably your best choice.
>
> FWIW
>
> Dave
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20150309/fb9964e5/attachment.html
More information about the clue
mailing list