It was pointed out in a FreeBSD PR that one of the the nc(1) man page examples no longer works. FreeBSD imports OpenBSD netcat.
With a commit on Wed Mar 20 09:27:56 2013 UTC nc.1 rev 1.62: Don't shutdown nc(1)'s network socket when stdin closes. Matches *Hobbit*'s original netcat and GNU netcat; revert to old behaviour with the new -N flag if needed. After much discussion with otto deraadt tedu and Martin Pelikan. ok deraadt@ the new -N flag was introduced to get the old auto-shutdown behaviour. One of the examples depends on his behaviour to work correctly. The attached patch updates the man page to include the -N flag in that example FreeBSD PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/185353 -- Allan Jude
Index: usr.bin/nc/nc.1 =================================================================== RCS file: /cvs/src/usr.bin/nc/nc.1,v retrieving revision 1.65 diff -u -p -r1.65 nc.1 --- usr.bin/nc/nc.1 20 Aug 2013 21:05:20 -0000 1.65 +++ usr.bin/nc/nc.1 10 Feb 2014 16:16:43 -0000 @@ -356,7 +356,7 @@ Using a second machine, connect to the l .Nm process, feeding it the file which is to be transferred: .Pp -.Dl $ nc host.example.com 1234 \*(Lt filename.in +.Dl $ nc -N host.example.com 1234 \*(Lt filename.in .Pp After the file has been transferred, the connection will close automatically. .Sh TALKING TO SERVERS
signature.asc
Description: OpenPGP digital signature