First of all I think that the confusion here is based on the fact that there are way too many versions of netcat in the wild (there's GNU netcat, OpenBSD netcat and fork of OpenBSD one just to name a few). In general, I'd try to avoid using nc for that reason – it is difficult to do it in a portable way.
It would be really nice to come up with a POSIX compliant way of opening TCP socket from inside a script. Unfortunately, my browsing through the Opengroup spec didn't unearth much. As it stands, I'd say that we've got the following options:
1. As Bill pointed out we can use bash, since the script requires bash already
2. GNU awk also has support for opening a TCP connection
3. ZK itself
Personally, I'd vote for including a very simple wrapper class into a ZK jar that would do what is expected to query a server. That also would take care of the less than ideal hack that is there to get clientPort data from the config.