I want to check input arguments presence on a bash script on OSX. I do:
if [-z "$1"]
I get:
/usr/local/bin/deploy.sh: line 8: [-z: command not found
Any tips?
Thanks.
You need a space around the condition:
if [ -z "$1" ]
^ ^
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With