From 2b5b6d6b7db2fd179972ed0d38a87ed80dd47446 Mon Sep 17 00:00:00 2001 From: schwarze Date: Tue, 21 Apr 2015 10:46:48 +0000 Subject: [PATCH] Back in January, Kaspars at Bankovskis dot net reported that the wc(1) manual claims that -m would count characters, while our version of the command actually doesn't, lacking POSIX multibyte support. Since nobody stood up to fix the code, sync the docs with reality for now. OK jmc@ --- usr.bin/wc/wc.1 | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/usr.bin/wc/wc.1 b/usr.bin/wc/wc.1 index a707f594cee..2e9525e3caa 100644 --- a/usr.bin/wc/wc.1 +++ b/usr.bin/wc/wc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: wc.1,v 1.24 2015/03/13 19:58:41 jmc Exp $ +.\" $OpenBSD: wc.1,v 1.25 2015/04/21 10:46:48 schwarze Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" from: @(#)wc.1 8.2 (Berkeley) 4/19/94 .\" -.Dd $Mdocdate: March 13 2015 $ +.Dd $Mdocdate: April 21 2015 $ .Dt WC 1 .Os .Sh NAME @@ -72,8 +72,9 @@ using powers of 2 for sizes (K=1024, M=1048576, etc.). The number of lines in each input file is written to the standard output. .It Fl m -The number of characters in each input file -is written to the standard output. +Intended to count characters instead of bytes; +currently an alias for +.Fl c . .It Fl w The number of words in each input file is written to the standard output. @@ -85,11 +86,6 @@ only reports the information requested by that option. The default action is equivalent to the flags .Fl clw having been specified. -The -.Fl c -and -.Fl m -options are mutually exclusive. .Pp If no file names are specified, the standard input is used and a file name is not output. @@ -103,11 +99,6 @@ input file of the form: lines words bytes file_name .Ed .Pp -If the -.Fl m -option is specified, -the number of bytes is replaced by -the number of characters in the listing above. The counts for lines, words, and bytes .Pq or characters are integers separated by spaces. @@ -120,7 +111,7 @@ The .Nm utility is compliant with the .St -p1003.1-2008 -specification. +specification, except that it ignores the locale. .Pp The flag .Op Fl h @@ -130,3 +121,7 @@ A .Nm utility appeared in .At v1 . +.Sh BUGS +The +.Fl m +option counts bytes instead of characters. -- 2.20.1