Theo de Raadt wrote:
> If you are going to introduce such complicated semantics, please
> include a proposal for the manual page change so that we can see
> if this can be simply described.  Being dimply described in the
> manual page is a marker for whether a change is suitable.

Stealing some words from chown...

Index: nc.1
===================================================================
RCS file: /cvs/src/usr.bin/nc/nc.1,v
retrieving revision 1.91
diff -u -p -r1.91 nc.1
--- nc.1        25 Sep 2018 20:05:07 -0000      1.91
+++ nc.1        22 Dec 2018 23:52:22 -0000
@@ -393,7 +393,7 @@ option is given).
 .Ar port
 can be a specified as a numeric port number, or as a service name.
 Ports may be specified in a range of the form
-.Ar nn Ns - Ns Ar mm .
+.Ar nn Ns : Ns Ar mm .
 In general,
 a destination port must be specified,
 unless the
@@ -491,12 +491,12 @@ to report open ports,
 rather than initiate a connection.
 For example:
 .Bd -literal -offset indent
-$ nc -z host.example.com 20-30
+$ nc -z host.example.com 20:30
 Connection to host.example.com 22 port [tcp/ssh] succeeded!
 Connection to host.example.com 25 port [tcp/smtp] succeeded!
 .Ed
 .Pp
-The port range was specified to limit the search to ports 20 \- 30.
+The port range was specified to limit the search to ports 20 : 30.
 .Pp
 Alternatively, it might be useful to know which server software
 is running, and which versions.
@@ -584,3 +584,9 @@ the
 combination could be useful for communications diagnostics.
 Note that the amount of UDP traffic generated may be limited either
 due to hardware resources and/or configuration settings.
+.Pp
+Previous versions of the
+.Nm nc
+utility used a hyphen to separate port ranges.
+This was changed to a colon to avoid ambiguity with hyphenated service names,
+though the hyphen separator remains supported for backwards compatibility.

Reply via email to