<div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 11:09 AM, David L. Willson <span dir="ltr"><<a href="mailto:DLWillson@thegeek.nu" target="_blank">DLWillson@thegeek.nu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Save me the man. What are a and v and why do you like them?</div><span class=""><div><br></div><div><br></div><div><div style="font-size:9px;color:#575757">Sent from my Verizon Wireless 4G LTE smartphone</div></div><div></div><br><br>-------- Original message --------<br></span><span class="">From: Chris Fedde <<a href="mailto:chris@fedde.us" target="_blank">chris@fedde.us</a>> <br>Date: 03/09/2015 10:51 AM (GMT-07:00) <br>To: CLUE's mailing list <<a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a>> <br></span><span class="">Subject: Re: [clue] seeking debugging advice <br><br></span><div><div class="h5"><div dir="ltr">I typically use 'set' and put each of the switches on it's own line. My bash script template includes:<div><br></div><div> #!/bin/bash</div><div><br></div><div> #set -x</div><div> #set -v</div><div> set -a</div><div> set -e</div><div> set -u</div><div><br></div><div>Then I comment and uncomment as needed. </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 8, 2015 at 10:40 PM, David L. Anselmi <span dir="ltr"><<a href="mailto:anselmi@anselmi.us" target="_blank">anselmi@anselmi.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>David L. Willson wrote:<br>
><br>
> I use eu always, and x when I'm having problems.<br>
<br>
</span>Yes, that's good. u helps you catch typos in variable names (that otherwise just expand to nothing).<br>
<br>
If you think there might be times when e stops your script and it shouldn't, you can always catch<br>
the error return and do the right thing from there. If you don't know what will cause an error or<br>
you don't know what the right thing is then exiting (via the e) is probably your best choice.<br>
<br>
FWIW<br>
<br>
Dave<br>
<div><div>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br>
</div></div></blockquote></div><br></div>
</div></div></div><br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>