icon Top 9 categories map      RocketAware >

wc(1)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others

[IEEE Std1003.2-1992 (``POSIX.2'')]

WC(1)                      OpenBSD Reference Manual                      WC(1)

NAME
     wc - word, line, and byte count



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

DESCRIPTION
     The wc utility reads one or more input text files, and, by default,
     writes the number of lines, words, and bytes contained in each input file
     to the standard output.  If more than one input file is specified, a line
     of cumulative count(s) for all named files is output on a separate line
     following the last file count.  wc considers a word to be a maximal
     string of characters delimited by white space.  White space characters
     are the set of characters for which the isspace(3) function returns true.

     The following options are available:

     -c      The number of bytes in each input file is written to the standard
             output.

     -l      The number of lines in each input file is written to the standard
             output.

     -m      The number of characters in each input file is written to the
             standard output.

     -w      The number of words in each input file is written to the standard
             output.

     When an option is specified, wc only reports the information requested by
     that option.  The default action is equivalent to the flags -clw having
     been specified.  The -c and -m options are mutually exclusive.

     The following operands are available:

     file    A pathname of an input file.

     If no file names are specified, the standard input is used and a file
     name is not output. The resulting output is one line of the requested
     count(s) with the cumulative sum of all files read in via standard input.

     By default, the standard output contains a line for each input file of
     the form:

           lines    words  bytes   file_name

     The counts for lines, words and bytes are integers separated by spaces.

     The wc utility exits 0 on success or >0 if an error occurred.

SEE ALSO
     isspace(3)

COMPATIBILITY
     Historically, the wc utility was documented to define a word as a ``maxi-
     mal string of characters delimited by <space>, <tab> or <newline> charac-
     ters''.  The implementation, however, didn't handle non-printing charac-
     ters correctly so that ``  ^D^E  '' counted as 6 spaces, while
     ``foo^D^Ebar'' counted as 8 characters.  4BSD systems after 4.3BSD modi-
     fied the implementation to be consistent with the documentation.  This
     implementation defines a ``word'' in terms of the isspace(3) function, as
     required by IEEE Std1003.2-1992 (``POSIX.2'').

STANDARDS
     The wc utility conforms to IEEE Std1003.2-1992 (``POSIX.2'').

HISTORY
     A wc utility appeared in Version 1 AT&T UNIX.

OpenBSD 2.6                     April 19, 1994                               2

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]
FreeBSD Sources for wc(1)
OpenBSD sources for wc(1)


[Overview Topics]

Up to: File filtering and processing - Methods of filtering and processing files. (character translation, comparison, search, sort, word counts, etc.)


RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others

[IEEE Std1003.2-1992 (``POSIX.2'')]




Rapid-Links: Search | About | Comments | Submit Path: RocketAware > wc.1/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments