I am trying to write a script to check to see if more than 1 command is available on my system. I have tried the following and get an error
if [$(test "$(command -v brew)")] && [$(test "$(command -v python)")]; then
echo -e "This will work"
fi
When I just need to do 1 of them I do
if test "$(command -v brew)"; then
echo -e "Hi"
fi
What am I doing wrong