I want to assign a variable conditionally.
This does not work
[[ -v $2]] && [$2 == "init" ] && command="./ops/init.sh"
[[ -v $2]] && [$2 == "destroy" ] && command="./ops/teardown.sh"
[ -z "${2}" ] && command="./ops/help.sh -h"
I am trying check for the existence of the argument and another conditon but I cannot get the syntax right