Bash Open Programm, gdy istnieje

#! /bin/bash
array=("Google Chrome")
value=$@

if [[ " ${array[*]} " =~ " ${value} " ]]; then
    # open programm when in array / available
    open -a "${array[*]}"
fi

if [[ ! " ${array[*]} " =~ " ${value} " ]]; then
    # Can't find program
    echo "Programm not avalailable"
fi
AttractivePenguin