Search notes:

Bash built-in: command

Check if an executable is available

The following if statement verifies that xclip is available. If it is not, the script exits with the code 1:
if ! command -v xclip >/dev/null 2>&1; then
  echo xclip is not available
  exit 1
fi

See also

type

Index