<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 9, 2014 at 5:41 PM, Barrie Stott <span dir="ltr"><<a href="mailto:zen146410@zen.co.uk" target="_blank">zen146410@zen.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1bv" class="a3s" style="overflow:hidden">BASH_FUNC_ttr%%=() { d="Jan 25: Feb 22: Mar 29: Apr 26: May 31: Jun 28: Sep 27: Oct 25: Dec 6";<br>
BASH_FUNC_usenosql%%=() { PS1="\[\](nosql):\W \$ \[\]";<br>
BASH_FUNC_mymup2pdf%%=() { mup-prog $@ > /tmp/<a href="http://x.ps" target="_blank">x.ps</a><div style="display:inline-block;width:16px;height:16px"> </div>;<br>
BASH_FUNC_b12%%=() { d=6;<br>
<br>
Yet, for all of these, ~/.bashrc has<br>
"function xxx {" instead of<br>
"BASH_FUNC_xxx%%=() {"<br></div></blockquote></div><br>Yes. This is the patch for Shellshock.</div><div class="gmail_extra"><br></div><div class="gmail_extra">My guess is, you have MacPorts' bash installed, and it is exporting functions in that way to avoid random things being interpreted as functions and eval-ed (aka Shellshock).</div><div class="gmail_extra"><br></div><div class="gmail_extra">But there is also /bin/bash aka /bin/sh, which does not have the Shellshock patch. It's trying to read those and define functions, but it doesn't know that it needs to strip off the Shellshock wrapper before using them, so it's trying to define functions that are both incorrect (having BASH_FUNC_ prefix) and invalid (trailing %%) because of the Shellshock wrappers around the names.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Apple's not patching 10.6, so either you must build a new bash yourself and copy it over /bin/bash (I do not recommend this) or apply the Debian / FreeBSD patch to MacPorts' bash to stop it from exporting functions at all.<br><div><br></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>