blob: 9ba4b224300373434acdf7831e8c11d2ec83e009 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
.Dd October 8, 2015
.Dt WHICH 1
.Os sbase
.Sh NAME
.Nm which
.Nd locate programs in the path
.Sh SYNOPSIS
.Nm
.Op Fl a
.Ar name ...
.Sh DESCRIPTION
.Nm
looks for each
.Ar name
in the
.Ev PATH
directories, stopping at the first match and printing
the full path to stdout.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl a
Don't stop at the first match and search all
.Ev PATH
directories.
.El
.Sh EXIT STATUS
.Bl -tag -width Ds
.It 0
Each
.Ar name
was found.
.It 1
At least one
.Ar name
was not found.
.It 2
No
.Ar name
was found.
.It 3
An error occurred.
.El
.Sh SEE ALSO
.Xr environ 7
|