/usr/share/doc/bash/examples/scripts/inpath is in bash-doc 4.4.18-2ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #! /bin/sh
#
# Search $PATH for a file the same name as $1; return TRUE if found.
#
command=$1
[ -n "$command" ] || exit 1
set `echo $PATH | sed 's/^:/.:/
s/::/:.:/g
s/:$/:./
s/:/ /g'`
while [ $# -ne 0 ] ; do
[ -f $1/$command ] && exit 0 # test -x not universal
shift
done
exit 1
|