Port of the "which" command for UNIX: report the complete path for a command/file or the shell alias in use.
This program is installable using the rpm package manager. See below for the install string. Required prerequisites are automatically processed by the package manager and, if needed, downloaded and installed.
yum install which
Program is distributed as ZIP package: download to temporary directory and unpack to destination folder. See below for download link(s).
Following ones are the download links for manual installation:
Which (17/9/2024, Anton Monroe) | Readme/What's new |
which.btm is a "which" utility for 4OS2.
An improved version of the which.btm written by Mike Bessy. It will evaluate a command and tell if it is an alias, 4OS2 batchfile, internal command, external command, Rexx script, etc. Also resolves symbolic links. Includes an experimental UNKNOWN_CMD alias that can let 4OS2 resolve and run symlinks.
-------------------------------------------------------------
which.btm
resolves a given command and tells you if it is an 4OS2 alias, internal
command, external command, or directory and shows its full path. It
also resolves symbolic links.
Usage:
which.btm <command> [-debug]
unknown_cmd.btm
is something I have been experimenting with. It may or may not turn out
to be useful. It will resolve a symlink and run the file that the link
points to. To use it you must define the UNKNOWN_CMD alias, as in
alias unknown_cmd=F:\sys\apps\4OS2\unknown_cmd.btm
Then if you type
awk
4OS2 will not find a command called awk.exe, so it will pass "awk" to
unknown_cmd.btm, which resolves the symlink and calls gawk.exe.
'date' is an internal 4OS2 command. But if you quote it
"date"
4OS2 will bypass the internal command and look for an external command
called 'date.exe'. If 4OS2 doesn't find date.exe in the %path, it passes
it on to unknown_cmd.btm, which resolves the symlink \usr\bin\date to its
target, \usr\libexec\bin\date.exe, and runs it.
It also works for Unix-style shell scripts, so if the script /usr/bin/foo
starts with "#!/bin/sh", you can run it by typing "foo".
It is not perfect. If you want to tinker with it, you should read the
comments at the beginning of unknown_cmd.btm to understand its limitations.
realname.btm
is needed by unknown_cmd.btm. It must be somewhere in your %path.
Anton Monroe
Suggestions and bug reports are welcome
|
www.hobbesarchive.com/Hobbes/pub/os2/util/shell/Which_Btm.zip | local copy | |
Which v. 2.1.5 (5/2/2016, KO Myung-Hun) | ||
hobbes.nmsu.edu/download/pub/os2/util/disk/which215.zip | ||
Which v. 2.20 (12/2/2012, Mentore Siesto) | ||
hobbes.nmsu.edu/download/pub/os2/util/disk/which-2_20_os2.zip | ||
Which v. 16081997 (16/8/1997, Brian Havard) | Readme/What's new |
An implementation of the classic which command. Tells you the full path of the program that will be run if you enter a certain command. OS/2, DOS and Win32 executables are all included. |
silk.apana.org.au/download/which.zip | local copy |
This work is licensed under a Creative Commons Attribution 4.0 International License.
Add new comment