Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wc(1) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setlocale(3C)

wctype(3I)

environ(5)

wc(1)

NAME

wc − display a count of lines, words and characters in a file

SYNOPSIS

wc [ −cClw ] [ name ... ]

AVAILABILITY

SUNWcsu

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 string of characters delimited by a SPACE , TAB , or by any other character in the library function iswspace() (see wctype(3I)). 

OPTIONS

When name is specified on the command line, the names are printed along with the counts. 

If no option is specified the default is −lwc (count lines, words, and bytes.) 

−c Count bytes. 

−C Count characters. 

−l Count lines. 

−w Count words delimited by white space characters or new line characters.  Delimiting characters are Extended Unix Code (EUC) characters from any code set defined by iswspace(). 

ENVIRONMENT

If any of the LC_∗ variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the environment, the operational behavior of wc for each corresponding locale category is determined by the value of the LANG environment variable.  If LC_ALL is set, its contents are used to override both the LANG and the other LC_∗ variables.  If none of the above variables is set in the environment, the "C"  (U.S. style) locale determines how wc behaves. 

LC_CTYPE
Determines how wc handles characters. When LC_CTYPE is set to a valid value, wc can display and handle text and filenames containing valid characters for that locale.  wc can display and handle EUC characters where any individual character can be 1, 2, or 3 bytes wide.  wc can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid. 

LC_MESSAGES
Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses.  In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English).

SEE ALSO

setlocale(3C), wctype(3I), environ(5)

SunOS 5.4  —  Last change: 14 Sep 1992

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