Bill Agee's blog

🤔 Reflections on test infrastructure, with a twist of user empathy.

Quick and dirty port scan with netcat

netcat (or "nc" on the command line) is a useful tool for many reasons.

One common test automation task I've found it handy for is polling a port, waiting for a service to start responding.

While there are many ways to do that, using nc is a handy way to get it done.

And it's easy to script - here's a short Perl snippet showing how to wrap nc to poll a port on a host:

Comments