WC (1)

NAME

wc - word count

CONTENTS

Synopsis
Description
Environment Variables
See Also

SYNOPSIS

wc [-c|-m] [-lw] [file ...]

DESCRIPTION

Wc determines the number of lines, words and characters contained in each file and writes the count in that order to standard output, separated by spaces and followed by the filename. If no file argument is given, standard input is used and no filename is printed. If more than one input file was processed successfully, a grand total for all files is printed in the line of output.

The wc command accepts the following options; if any of them is present, output is restricted to the specified fields:
-c Print the number of bytes.
-l Print the number of lines (i. e. newline characters).
-m Print the number of characters instead of the number of bytes. The number of characters equals the number of bytes in singlebyte locales. In multibyte locales, this is the count of byte sequences forming a valid character. This option was introduced by POSIX.2.
-w Print the number of words. With /usr/5bin/wc and /usr/5bin/s42/wc, a word is a string of characters that contains at least one graphical character and is delimited by blank or newline characters. With /usr/5bin/posix/wc and /usr/5bin/posix2001/wc, a word is a nonempty string of characters that is delimited by white space.

ENVIRONMENT VARIABLES

LANG, LC_ALL
  See locale(7).
LC_CTYPE
  Determines the byte sequences that form a character for the -m option and for the interpretation of white space, graphical characters and newlines.

SEE ALSO

cksum(1), locale(7)


Heirloom Toolchest WC (1) 2/6/05
Generated by a modified version of manServer 1.07 from wc.1 using man macros.