What error are you getting when you run your script?
I just tried that in my environment and it worked fine for me.
Note that the exit codes from BLCLI commands can be deceptive. For instance, even if the server doesn't exist you'll get an exit code of zero. So when you're scripting BLCLI commands, you may need to include regex to look for specific results, such as "Command execution failed" instead of numeric exit codes.