Hey guys....
I'm having a problem with a script that I wrote. The problem that I'm having is with the 'if' test. Here's the code...
I get an error that looks like this:Code:echo "Enter data." read variable if [-z $variable] then echo "Please restart script and enter variable when asked." exit else ...else stuff... fi
I've tried several different ways and all come out with basically the same result. I want the logic to read as follows...Code:./fw-calc: [-z: not found
Any help would be appreciated. Thanks.Code:if variable is null then ...variable null code... else ...variable NOT null code... fi


Reply With Quote