<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 26, 2010, at 10:09 PM, <a href="mailto:errordeveloper@gmail.com">errordeveloper@gmail.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dan, i am sorry but your function { } business is teribly misleading!<br>it's gust alias pd="/path/to/app/bin/pd" that anyone would ever need ..<br></div></blockquote><div><br></div><div>Yeah, I hadn't tried an alias. &nbsp;I think it's a better option.</div><br><blockquote type="cite"><div>well, do you wanna go like:<br><br>PD=//Applications/Pd-extended.app/Contents/Resources/bin/pd<br>THIS_COULD_BE_THE_ONLY_REASON_WHY_WE_NEED_IT=$MY_ERRORNO_CMD_NOT_FOUND<br><br>function pd {<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>if [ -x $PD ] then<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>`dirname $PD`/`basename pd`<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>else<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>echo "COMMAND NOT FOUND, this is a redundant msg!"<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>exit $THIS_COULD_BE_THE_ONLY_REASON_WHY_WE_NEED_IT<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}</div></blockquote><div><br></div><div>I'm sorry but your example is terribly redundant.&nbsp;Obviously if you adding a function to your .bash_profile you would know that the binary should be there.&nbsp;I only supplied an approach that worked for me, sorry to post an inferior option. *sheesh*</div><br><blockquote type="cite"><div><blockquote type="cite">I had the same issue when trying to use some scripts I made in Linux with pd. I solved it by adding some function wrappers to my ~/.bash_profile:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"># pd commandline<br></blockquote><blockquote type="cite">function pd {<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>/Applications/Pd-extended.app/Contents/Resources/bin/pd $@;<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite">export -f pd<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">function pdsend {<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>/Applications/Pd-extended.app/Contents/Resources/bin/pdsend $@;<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite">export -f pdsend<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Make sure to restart the terminal session for it to take effect.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--------<br></blockquote><blockquote type="cite">Dan Wilcox<br></blockquote><blockquote type="cite"><a href="http://danomatika.com">danomatika.com</a><br></blockquote><blockquote type="cite"><a href="http://robotcowboy.com">robotcowboy.com</a></blockquote></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--------</div><div>Dan Wilcox</div><div><a href="http://danomatika.com">danomatika.com</a></div><div><a href="http://robotcowboy.com">robotcowboy.com</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></body></html>