netcat -q option either doesn't work for me or I got it wrong:
from man 1:
-q seconds after EOF is detected, wait the specified number of seconds and then quit.
Code:
$ nc -lp 9999 <bigfile &
$ nc localhost 9999 -q seconds </dev/null
Both exit in a fraction of second, and I get always the same (small) amount of
bigfile on the client side,
no matter what number of seconds I use.
What does that number mean? Shouldn't it have the same effect as this one?
Code:
$ nc -lp 9999 <bigfile &
$ sleep seconds | nc localhost 9999 -q 0
This is for version 1.10-21 and 1.10-33 on Slackware 10.2.
GNU and OpenBSD netcat as well as the original nc 1.10, don't have a -q option.
thanks
kc