Command xwhich
Name
xwhich Prints the type of commandsSynopsis
xwhich [ serialization options ] [-n] command [command...]Options
-n | No output |
Supports the standard [ serialization options ]
xwhich prints the location and type information of all arguments.
Arguments are evaluated as if they were to be executed as commands in the shell, and their full path (if available) and type
is printed as an XML document.
xwhich returns the number of commands not found (or 0 / true if all commands are found)
If -n is specified only the check and return value is performed and nothing is output. This can be used to determine if a command exists.
Example:
xwhich xwhich xpwd true
Result
<xwhich>
<command name="xwhich" type="CMD_TYPE_BUILTIN"/>
<command name="xpwd" type="CMD_TYPE_INTERNAL"/>
<command name="true" type="CMD_TYPE_BUILTIN"/>
</xwhich>
<command name="xwhich" type="CMD_TYPE_BUILTIN"/>
<command name="xpwd" type="CMD_TYPE_INTERNAL"/>
<command name="true" type="CMD_TYPE_BUILTIN"/>
</xwhich>
Commands
CategoryCommands