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

Date: 2020-01-21

Tags:  bash

Share: