Sh command that ascends dir tree for executable

Before I do and implement this myself, want to make sure it doesn;t
already exist in some fashion: A command line utility like ‘sh’ but one
that will ascend the directory tree to find the executable.

Thanks,
T.