# whence: how a name would be interpreted. f() { :; } alias al='echo x' whence echo f al if whence -v echo f al if whence sh | grep -c '^/' whence -p sh | grep -c '^/' whence -p echo | grep -c '^/' whence -p f; echo "status=$?" whence no-such-command-zz; echo "status=$?" whence -v no-such-command-zz 2>&1; echo "status=$?" whence -q 2>/dev/null; echo "status=$?"