redyt icon indicating copy to clipboard operation
redyt copied to clipboard

Proper way of checking existence of a program

Open anntnzrb opened this issue 4 years ago • 0 comments

This explains why this method works best: https://stackoverflow.com/questions/592620/how-can-i-check-if-a-program-exists-from-a-bash-script

I added the extra -x flag as this also checks if the given command is a binary, this makes the check ignore user-defined aliases and functions.

anntnzrb avatar Jan 05 '21 03:01 anntnzrb