Small replacement script for the shell-builtin "command"
While trying to get my thinclient installation to work, I recognized that
Debian's "startx" command uses the shell builtin "command"
to check where the binary "deallocvt" is located.
This shell builtin is not available when using busybox v0.60. Of course I could
simply replace the command-call in startx with a call to "which", but
that would break my thinclient-creation script, so I wrote a simple command
replacement as shell script:
# This script tries to replace the BASH-builtin "command" (according to
# the information I got from "man command".
# Some scripts (e.g. startx) rely on this builtin command
# by Alexander Griesser
if [ $# -lt 1 ]; then
case $1 in
if which $2 >/dev/null 2>&1; then
echo $2 is $(which $2)
echo "command: $2: not found"
Name this script "command" (without the .sh extension) and place
it anywhere in your $PATH (I put it to /bin).
As with version 1.0pre the command-builtin appeared in busybox, yeah!