i am having a bit of an issue with the below bash script that it always has the error ./check2.sh: 2: Syntax error: "(" unexpected , i have tried every which way to try and fix this i am probably missing something simple. can anyone give me some guidance
# array of dependencies
array=("convert" "ffmpeg");
for i in "${array[@]}"
do
command -v $i >/dev/null 2>&1 || {
echo >&2 "$i required";
exit 1;
}
done