WHICH(1CSH) COMMAND REFERENCE WHICH(1CSH)
NAME
which - report command interpretation (csh built-in)
SYNOPSIS
which [ -a ] command...
DESCRIPTION
The command which reports the interpretation of the given
commands. If the command is an alias, the text ``command is
an alias for'' followed by the alias expansion, is printed.
If the command is a built-in, the text ``command is a
builtin command'' is printed. Otherwise, the execution path
is searched for command. If the command is in the path, the
text ``command is pathname'' is printed. If the command can
not be found, the text ``command is not a command'' is
printed.
OPTIONS
-a Print all interpretations of the command instead of just
the one that would be executed.
EXAMPLES
Assume that the alias `echo' exists and is set to `cat \!*',
and that the command /bin/echo exists, and that /bin is in
the user's execution path. Also, assume that there is no
alias or command in the execution path called `goober'. In
this case, the command
which -a echo goober
would print
echo is an alias for cat \!*
echo is a builtin command
echo is /bin/echo
goober is not a command
RETURN VALUE
[NO_ERRS] Command completed without error.
[1] An error of the type described in the message
occurred.
CAVEATS
This command has a different use than pathof(1), and is not
intended as a replacement.
Printed 10/17/86 1
WHICH(1CSH) COMMAND REFERENCE WHICH(1CSH)
The execution path hashing is not taken into account during
path searches, so it is possible for which to report a
pathname which is not the same one used by csh(1csh).
SEE ALSO
@(1csh), alias(1csh), bg(1csh), break(1csh), cd(1csh),
chdir(1csh), continue(1csh), csh(1csh), dirs(1csh),
echo(1csh), eval(1csh), exec(1csh), exit(1csh), fg(1csh),
glob(1csh), goto(1csh), hashstat(1csh), history(1csh),
jobs(1csh), kill(1csh), limit(1csh), logout(1csh),
nice(1csh), nohup(1csh), notify(1csh), onintr(1csh),
pathof(1), popd(1csh), pushd(1csh), rehash(1csh),
repeat(1csh), set(1csh), setenv(1csh), sh(1sh), shift(1csh),
source(1csh), stop(1csh), suspend(1csh), time(1csh),
type(1sh), umask(1csh), unhash(1csh), unalias(1csh),
unlimit(1csh), unset(1csh), unsetenv(1csh), wait(1csh),
which(1sh).
Printed 10/17/86 2
%%index%%
na:72,106;
sy:178,143;
de:321,983;
op:1304,170;
ex:1474,538;
rv:2012,230;
ca:2242,161;2547,229;
se:2776,1589;
%%index%%000000000143