Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2000 18:34:21 -0600
From:      Chris Costello <chris@calldei.com>
To:        Matthew Hunt <mph@astro.caltech.edu>
Cc:        Garance A Drosihn <drosih@rpi.edu>, Laurence Berland <stuyman@confusion.net>, Chuck Robey <chuckr@picnic.mat.net>, Alfred Perlstein <bright@wintelcom.net>, Dan Papasian <bugg@bugg.strangled.net>, current@FreeBSD.ORG
Subject:   Re: which(1), rewritten in C?
Message-ID:  <20000306183420.A9184@holly.calldei.com>
In-Reply-To: <20000303120441.A56070@wopr.caltech.edu>
References:  <Pine.BSF.4.21.0003022232310.301-100000@picnic.mat.net> <38BF334F.2F10D4B0@confusion.net> <v0421010db4e5929ddd15@[128.113.24.47]> <20000303120441.A56070@wopr.caltech.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, March 03, 2000, Matthew Hunt wrote:
> and the "type" builtin is too verbose, saying "which is hashed
> (/usr/bin/which)."

   In ksh, `whence' is a bit equivalent to `which' (`type' in ksh
is an alias to `whence -v').

   From the AT&T ksh manual:

       whence [ -afpv ] name ...
              For each name, indicate how it would be interpreted
              if used as a command name.
              The  -v option produces a more verbose report.  The
              -f options skips the search for functions.  The  -p
              option  does a path search for name even if name is
              an alias, a function, or a reserved word.   The  -a
              option  is  similar to the -v option but causes all
              interpretations of the given name to be reported.

   Which would yield the following behavior:

$ whence pwd
pwd
$ whence -f pwd
pwd
$ whence -p pwd
/bin/pwd
$ whence -v pwd
pwd is a shell builtin
$ whence -a pwd
pwd is a shell builtin
pwd is a tracked alias for /bin/pwd

-- 
|Chris Costello <chris@calldei.com>
|A paperless office has about as much chance as a paperless bathroom.
`--------------------------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000306183420.A9184>