How to make an Echo server with Bash?
If you use ncat instead of nc your command line works fine with multiple connections but (as you pointed out) without -p. ncat -l 2000 -k -c ‘xargs -n1 echo’ ncat is available at http://nmap.org/ncat/. P.S. with the original the Hobbit’s netcat (nc) the -c flag is not supported. Update: -k (–keep-open) is now required … Read more