How to create a concurrency test in a shell script?

I am trying to replicate the concurrency test in a shell script, either using netcat or whichever tool you suggest.

This is the test that I am trying to replicate:

So, the test starts a few Redis clients and uses them in parallel, at the same time. But, they don’t close a connection automatically after sending a command from a client. They manually close the connections (sockets/streams) at the end, but they keep the connection alive for the whole duration of the test. If I use nc it will close the connection after sending a single command, so I can’t use it for a concurrency test, at least not in the default way.

Does somebody have an idea how to make this work?