I'd recommend something like this:
echo Enter Name
if [ -z "$name" ];then
1. You need a space between "$name" and the right bracket (as has already been pointed out)
2. Just like you should always return something from your C/C++ program (if you declare "int main()"), then
it's generally a good idea to explicitly return a value from your script (at least for an error exit, like this).
3. Finally, I always put the variable (here, $name) in quotes whenever I use "test -z".
Linux/Bash seems to behave fine with or without them, but most other Unix's I've dealt with in the
past tend to crash with a similar "test: missing argument" error if you ever actually give it an empty
Just a suggestion .. PSM