Author | Jamozed <[email protected]> |
Date | 2021-01-07 14:07:11 |
Commit | 1fcd34999646572e7020e8eeaca3453cc6e353c9 |
Parent | be0a1d282aa384272424ae6966cc85342e66bcfe |
wc: Add wc manpage
Diffstat
M | README.md | | | 1 | + |
A | man/wc.1 | | | 41 | +++++++++++++++++++++++++++++++++++++++++ |
M | src/wc.c | | | 2 | +- |
3 files changed, 43 insertions, 1 deletions
diff --git a/README.md b/README.md index 2d1f01c..7b76911 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ UNIX-like systems. | tty | Return user's terminal name | POSIX | | uname | Return system name | POSIX | | unlink | Remove a file using the unlink function | POSIX | +| wc | Word, line, and byte or character count | POSIX | | yes | Output a string repeatedly | | Utilities marked with a '\*' may be incomplete or non-complaint. diff --git a/man/wc.1 b/man/wc.1 new file mode 100644 index 0000000..699c8e7 --- /dev/null +++ b/man/wc.1 @@ -0,0 +1,41 @@ +.TH WC 1 2021-01-08 "OMKOV coreutils" "General Commands Manual" +.SH NAME +wc \(em word, line, and byte or character count +.SH SYNOPSYS +\fBwc\fR [-clmw] [file...] +.SH DESCRIPTION +Write the number of words, lines, and bytes or characters to standard output. +.SH OPTIONS +The following options are supported: +.TP +.B -c +Print the number of bytes in the file. +.TP +.B -l +Print the number of newlines in the file. +.TP +.B -m +Print the number of characters in the file. +.TP +.B -w +Print the number of words in the file. +.TP +.B --help +Display help information. +.TP +.B --version +Display version information. +.SH EXIT STATUS +The following exit values will be returned: +.TP +\ 0 +Successful completion. +.TP +>0 +An error occurred. +.SH COPYRIGHT +.nf +Copyright (C) 2021, Jakob Wakeling +All rights reserved. +OMKOV Permissive Licence (https://www.omkov.net/OLPE) +.fi diff --git a/src/wc.c b/src/wc.c index c130415..d0a4970 100644 --- a/src/wc.c +++ b/src/wc.c @@ -1,6 +1,6 @@ // wc.c, version 0.2.0 // OMKOV coreutils implementation of POSIX wc -// Copyright (C) 2020, Jakob Wakeling +// Copyright (C) 2021, Jakob Wakeling // All rights reserved. /*