which - locate a command
which [-a] [--] filename
which returns the pathname of the files which would be executed in the current environment. It does this by searching the PATH for executable files matching the name of the argument.
which
As this is Win32:
the current directory is explored before PATH
the extensions specified in PATHEXT are added to the given filename to find an executable file matching the command
-a
print all pathnames instead of only the first one
0
if the specified command is found
1
if the specified command is not found
2
if an invalid option is specified
This program in distributed in the CPAN distribution Win32::App::which.
Olivier Mengué <dolmen@cpan.org>
<dolmen@cpan.org
Copyright © 2010-2011 Olivier Mengué.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
To install Win32::App::which, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::App::which
CPAN shell
perl -MCPAN -e shell install Win32::App::which
For more information on module installation, please visit the detailed CPAN module installation guide.