help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to test a object name is an executable ?


From: Seth David Schoen
Subject: Re: How to test a object name is an executable ?
Date: Wed, 30 Aug 2023 17:46:17 -0700

Budi writes:

> Must be pure Bash only to prevent costly execution another

You could use "command -v" or "type -p"/"type -P" somehow instead of
"which".  The details depend on what you want to do in case the command
is intelligible to the shell but is not (directly) an external program,
like in the case of a shell alias, shell function, or shell builtin.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]