Check if a program exists

PHOTO EMBED

Wed Jun 09 2021 10:26:20 GMT+0000 (UTC)

Saved by @dimitri9494 #linux #shell-script

command -v STM32_Programmer_CLI >/dev/null 2>&1 || { echo >&2 "Need to add STM32_Programmer_CLI to the enviorenment path. Aborting..."; exit 1; }
content_copyCOPY

Check if a program exists. Works also if the program exists but its path is not on the environment variables