Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wc(1) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



WC(1)                                                                    WC(1)



NAME
     wc - word, line and byte or character count

SYNOPSIS
     wc [ -c|-m ] [ -lw ] [ names ]

DESCRIPTION
     wc counts lines, words, and characters or bytes in the named files, or in
     the standard input if no names appear.  It also keeps a total count for
     all named files, if more than one input is specified.  The wc utility
     considers a word to be a non-zero length string of characters delimited
     by white space.

OPTIONS
     The wc utility conforms to the XBD specification in the utility argument
     syntax guideline.

     The following options are supported:

     -c   Write to the standard output the number of bytes in each input file.


     -l   Write to the standard output the number of newline characters in
          each input file.

     -m   Write to the standard output the number of characters in each input
          file.

     -w   Write to the standard output the number of words in each input file.

     The options l , w , and c or m may be used in any combination to specify
     that a subset of lines, words, and bytes or 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.

OPERANDS
     The following operand is supported:

     file A pathname of an input file. If no file operand is specified, the
          standard input will be used.

STDIN
     The standard input will be used only if no file operands are specified.
     See INPUT FILES.

INPUT FILES
     The input files may be of any type.






                                                                        Page 1





WC(1)                                                                    WC(1)



ENVIRONMENT VARIABLES
     The following environment variables affect the execution of wc:

     LANG provide a default value for the internationalization variables that
          are unset or null.  If LANG is unset or null the corresponding value
          from the implementation-specific default locale will be used. If any
          of the internationalization variables contains an invalid setting,
          the utility will behave as if none of the variables had been
          defined.

     LCALL
          if set to a non-empty string value, override the values of all the
          other internationalization variables.

     LCCTYPE
          determine the locale for the interpretation of sequences of bytes of
          text data as characters (for example, single - as opposed to multi-
          byte - characters in arguments).

     LCMESSAGES
          determine the locale that should be used to affect the format and
          contents of diagnostic messages written to standard error.

     NLSPATH
          determine the location of message catalogs for the processing of
          LC_MESSAGES.

STDOUT
     By default, the standard output contains an entry for each input file of
     the form:

     "%d %d %d %s\n", <newlines> , <words> , <bytes> , <file>

     If the -m option is specified, the number of characters replace the
     <bytes> field in this format.

     If any options are specified and the -l option is not specified, the
     number of newline characters will not be written.

     If any options are specified and the -w option is not specified, the
     number of words will not be written.

     If any options are specified and neither -c nor -m is specified, the
     number of bytes or characters will not be written.

     If no input file operands are specified, no name will be written and no
     blank characters preceding the path name will be written.

     If more than one input file operand is specified, an additional line will
     be written, of the same format as the other lines, except that the word
     total (in the POSIX locale) will be written instead of a pathname and the
     total of each column will be written as appropriate. Such an additional



                                                                        Page 2





WC(1)                                                                    WC(1)



     line, if any, will be written at the end of the output.

STDERR
     Used only for diagnostic messages.

OUTPUT FILES
     None.

EXIT STATUS
     The following exit values are returned:
     0   successful completion
     >0  an error occured











































                                                                        Page 3



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