[clue] seeking debugging advice
David L. Willson
DLWillson at TheGeek.NU
Mon Mar 9 11:09:46 MDT 2015
Save me the man. What are a and v and why do you like them?
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message --------
From: Chris Fedde <chris at fedde.us>
Date: 03/09/2015 10:51 AM (GMT-07:00)
To: CLUE's mailing list <clue at cluedenver.org>
Subject: Re: [clue] seeking debugging advice
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/503ee05e/attachment-0001.html
More information about the clue
mailing list