sbase/which.1

45 lines
571 B
Groff
Raw Permalink Normal View History

.Dd 2015-10-08
2015-04-27 10:24:43 -04:00
.Dt WHICH 1
.Os sbase
.Sh NAME
.Nm which
.Nd locate programs in the path
2015-04-27 10:24:43 -04:00
.Sh SYNOPSIS
.Nm
.Op Fl a
.Ar name ...
2015-04-27 10:24:43 -04:00
.Sh DESCRIPTION
.Nm
looks for each
.Ar name
in the
2015-04-27 10:24:43 -04:00
.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
2015-04-27 10:24:43 -04:00
.Sh EXIT STATUS
.Bl -tag -width Ds
.It 0
Each
.Ar name
was found.
2015-04-27 10:24:43 -04:00
.It 1
At least one
.Ar name
was not found.
2015-04-27 10:24:43 -04:00
.It 2
No
.Ar name
was found.
.It 3
An error occurred.
2015-04-27 10:24:43 -04:00
.El
.Sh SEE ALSO
.Xr environ 7