I want to check input arguments on not 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" ] ^ ^
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
By posting your answer, you agree to the privacy policy and terms of service.
asked
2 years ago
viewed
271 times
active