[clue] seeking debugging advice

Chris Fedde chris at fedde.us
Mon Mar 9 12:14:50 MDT 2015


the man would have done this faster.   set -a is like putting export on all
your vars. -v prints the line that will be executed before it is
interpolated: If -x is the after then -v is the before.

On Mon, Mar 9, 2015 at 11:09 AM, David L. Willson <DLWillson at thegeek.nu>
wrote:

> 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
>>
>
>
> _______________________________________________
> 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/d9c01037/attachment.html 


More information about the clue mailing list