sbase/wc.1
FRIGN 8ab096d2a4 Finish up wc(1)
Use size_t for all counts, fix the manpage and refactor the code.
Here's yet another place where GNU coreutils fail:

sbase:
$ echo "GNU/Turd sucks" | wc -cm
    15

coreutils:
$ echo "GNU/Turd sucks" | wc -cm
     15      15

Take a bloody guess which behaviour is correct[0].

[0]: http://pubs.opengroup.org/onlinepubs/009604499/utilities/wc.html
2015-02-01 03:01:11 +01:00

33 lines
500 B
Groff

.Dd February 1, 2015
.Dt WC 1
.Os sbase
.Sh NAME
.Nm wc
.Nd word count
.Sh SYNOPSIS
.Nm
.Op Fl c | Fl m
.Op Fl lw
.Op Ar file ...
.Sh DESCRIPTION
.Nm
prints the number of lines, words and bytes in each
.Ar file ,
unless set differently with flags.
If no
.Ar file
is given
.Nm
reads from stdin.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl c | Fl l | Fl m | Fl w
Print the number of bytes | lines | characters | words.
.El
.Sh STANDARDS
The
.Nm
utility is compliant with the
.St -p1003.1-2008
specification.