🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #459

hash in /bin/sh

#459
From: Lukas
Date: Tue, 13 Oct 1987 23:55
33 lines
1891 bytes
I hope that there is someone out there in netland that can help me to
understand the hash function of sh.

I thought that each command, as it was invoked, had its full path
description evaluated (using $PATH) and placed in the hash list. Then,
at future invocations, the path description could be gotton from the
hash list rather than being reevaluated.

This doesnt seem to be the case. I tested quite a few of my own
commands (on two different machines) and it seems that the command
location is reevaluted on each invocation. However, occasionally,
the reevaluation does NOT occur, and I have not found out why, or
how to predict the behavior.

Also, all commands in the hash list have the "*" next to the "hits"
data, again except occasionally. I cant determine what causes the "*"
(which I think means "reevaluation") to be present or not, or how
to control it. The absence of the "*" does NOT seem to be related
to reevaluation (I have seen one that was reevaluated anyway; the
new hash value had the "*").

Also, sometimes, after invoking a command, the hash list will be
cleared. Future invocations of the same command do NOT clear the
hash list.

Sorry if this is all elementary (my dear Watson), but none of the
reference materials I have do more than mention the hash. I am
flummoxed. HELP!
-- 

	John Lukas
	ihnp4!ihlpf!lukas
	312-510-6290
Technical Details
Message-ID: <2056@mcdchg.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!hplabs!gatech!mcdchg!usenet

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!hplabs!gatech!mcdchg!usenet
From: lukas@ihlpf.ATT.COM (Lukas)
Newsgroups: comp.unix
Subject: hash in /bin/sh
Message-ID: <2056@mcdchg.UUCP>
Date: Tue, 13-Oct-87 19:55:05 EDT
Article-I.D.: mcdchg.2056
Posted: Tue Oct 13 19:55:05 1987
Date-Received: Thu, 15-Oct-87 20:47:03 EDT
Sender: usenet@mcdchg.UUCP
Organization: AT&T Bell Laboratories
Lines: 33
Approved: usenet@mcdchg.UUCP