Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wc(1) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

WC(1)  —  HP-UX

NAME

wc − word, line, and character count

SYNOPSIS

wc [ −lwc ] [ names ]

DESCRIPTION

Wc counts lines, words, and characters in the named files, or in the standard input if no names appear.  It also keeps a total count for all named files.  A word is a maximal string of characters delimited by spaces, tabs, or new-lines. 

The options l, w, and c may be used in any combination to specify that a subset of lines, words, and characters are to be reported.  The default is −lwc. 

When names are specified on the command line, they will be printed along with the counts. 

EXAMPLES

The command:

wc -w file1

prints the number of words in file1.

The following is printed when the above command is executed:

n file1

where n is the number of words in file1.

BUGS

Wc counts the number of new-lines to determine the line count.  If an ASCII text file has a final line that is not terminated with a new-line character, the count will be off by one. 

If there are very many characters, words, and/or lines in an input file, the output may be hard to read.  This is because wc reserves a fixed column width for each count. 

INTERNATIONAL SUPPORT

8-bit data, 8-bit filenames, messages. 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026