Bash to check is a program exists


To make sure a script’s dependencies are installed:

if ! [ -x "$(command -v jq)" ]; then
	echo "ERROR: jq is not installed."
	exit 1
fi

source

Tags:  bash

Share: