GNU netcat supports the "-c" command-line parameter which causes netcat to close the network connection when it sees EOF on STDIN. This option is extremely useful in writing scripts with netcat but is not documented in the man page. It should be.
Steps to Reproduce:
Thanks for the suggestion, it does sound like a useful flag. Assigning to maintainers.
Fixed in 0.7.1-r2. Thanks for reporting.