Colin: The *bash* man page was probably the only one I didn't look through. duh.<br><br>Jeff: Is that also why "php is hashed (/usr/bin/php)" is returned when `type php` is run?<br>
<br>Thanks both.<br><br><div class="gmail_quote">On Wed, Jan 6, 2010 at 10:00 PM, Jeffrey Ollie <span dir="ltr"><<a href="mailto:jeff@ocjtech.us">jeff@ocjtech.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Jan 6, 2010 at 9:54 PM, Colin Burnett <<a href="mailto:cmlburnett@gmail.com">cmlburnett@gmail.com</a>> wrote:<br>
> From the bash man page:<br>
><br>
> `If the name is neither a shell function nor a builtin, and contains<br>
> no slashes, bash searches each element of the PATH for a directory<br>
> containing an executable file by that name. Bash uses a hash<br>
> table to remember the full pathnames of executable files. A full<br>
> search of the directories in PATH is performed only if the command is<br>
> not found in the hash table.`<br>
><br>
> I interpret that to mean if you call foo from /a/b/c then it<br>
> 1) looks for /a/foo<br>
> 2) looks for /a/b/foo<br>
> 3) looks for /a/b/c/foo<br>
<br>
</div>Bash will not look in any of these directories.<br>
<div class="im"><br>
> 4) iterates through $PATH, in order, looking for the first executable foo.<br>
<br>
</div>Yep. The hash table is only an optimization.<br>
<font color="#888888"><br>
--<br>
Jeff Ollie<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Cialug mailing list<br>
<a href="mailto:Cialug@cialug.org">Cialug@cialug.org</a><br>
<a href="http://cialug.org/mailman/listinfo/cialug" target="_blank">http://cialug.org/mailman/listinfo/cialug</a><br>
</div></div></blockquote></div><br>