From owner-freebsd-questions Sun Feb 1 13:13:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA06877 for questions-outgoing; Sun, 1 Feb 1998 13:13:43 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from BIGFUN.vwcom.com (BIGFUN.vwcom.com [151.197.101.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA06777 for ; Sun, 1 Feb 1998 13:12:25 -0800 (PST) (envelope-from bmc@WillsCreek.COM) Received: from WillsCreek.COM (gw.willscreek.com [151.197.101.46]) by BIGFUN.vwcom.com (8.8.6/8.8.6) with ESMTP id QAA15989; Sun, 1 Feb 1998 16:07:06 -0500 (EST) Received: from current.willscreek.com (current.willscreek.com [172.16.87.1]) by WillsCreek.COM (8.8.8/8.8.5) with ESMTP id QAA00334; Sun, 1 Feb 1998 16:11:59 -0500 (EST) Received: (from bmc@localhost) by current.willscreek.com (8.8.8/8.8.5) id QAA05678; Sun, 1 Feb 1998 16:11:59 -0500 (EST) Date: Sun, 1 Feb 1998 16:11:59 -0500 (EST) Message-Id: <199802012111.QAA05678@current.willscreek.com> From: Brian Clapper MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "Joe \"Marcus\" Clarke" Cc: "Matthew D. Fuller" , laszlo vagner , Greg Lehey , questions@FreeBSD.ORG Subject: Re: rehash missing In-Reply-To: References: X-Mailer: VM 6.23 under Emacs 19.34.1 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe questions" On 1 February, 1998, at 05:09 (-0500) "Joe \"Marcus\" Clarke" wrote: > A quick way to find out if a command is built into the shell or not, is > to run 'which '. It will tell you right waway. Note that `which' won't tell you the command is a built-in unless you use `csh' or `tcsh', where `which' itself is a built-in. In a shell for which there is no `which' built-in (e.g., `ksh'), you'll end up running `/usr/bin/which', and that "outside" command cannot possibly know about the shell's built-in commands or its currently-established aliases. Try typing which alias inside `ksh'. You'll get no output. However, for most of the shells supported by FreeBSD, there is typically a built-in command that corresponds to `which'. For example: --------------------------------------------------------------------------- SHELL COMMAND --------------------------------------------------------------------------- tcsh which csh which sh type ksh whence -v type (which is nothing more than an alias for `whence -v' bash type zsh type which whence -v --------------------------------------------------------------------------- Brian Clapper, bmc@WillsCreek.COM, http://WWW.WillsCreek.COM/ You should emulate your heros, but don't carry it too far. Especially if they are dead.