I want to use nc as a simple TCP/IP server. So far I run it using:
nc
$ nc -k -l 3000 > temp.tmp
This works, but writes all the re
Omit the -k and run it in a loop:
-k
n=0 while nc -l 3000 > "$n".txt ; do n=$((n+1)) done