wc man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

wc(1)									 wc(1)

       wc - count words, lines, and bytes or characters in a file


       The  command  counts lines, words, and bytes or characters in the named
       files, or in the standard input if no file  names  are  specified.   It
       also keeps a total count for all named files.

       A  word	is  a  string of characters delimited by spaces, tabs, or new‐

       recognizes the following options:

	      Report the number of bytes in each input file.

	      Report the number of newline characters in each input file.

	      Report the number of characters in each input file.

	      Report the number of words in each input file.

       The and options are mutually exclusive.	Otherwise, the and or  options
       can  be	used  in  any  combination  to specify that a subset of lines,
       words, and bytes or characters are to be reported.

       When any option is specified, reports only the  information  requested.
       If no option is specified, the default output is

       When a file is specified on the command line, its name is printed along
       with the counts.

   Standard Output
       By default, the standard output contains an entry for each  input  file
       in the form:

	      newlines words bytes file

       If the option is specified, the number of characters replaces the bytes
       field in this format.

       If any option is specified, the fields for the unspecified options  are

       If  no file operand is specified, neither the file name nor the preced‐
       ing blank character is written.

       If more than one file operand is specified, an additional line is writ‐
       ten  at	the  end of the output, of the same format as the other lines,
       except that the word (in the POSIX locale) is written instead of a file
       name and the total of each column is written as appropriate.

       Under  UNIX  Standard  environment,  a  word  is a string of characters
       delimited by spaces, tabs, newline, carriage-return, vertical  tab,  or

       exits with one of the following values:

	      Successful completion.
	      An error occurred.

       For information about the UNIX Standard environment, see standards(5).

   Environment Variables
       determines  the	range of graphics and space characters, and the inter‐
       pretation of text as single- and/or multibyte characters.

       determines the language in which messages are displayed.

       If or is not specified in the environment or is null, they  default  to
       the value of

       If is not specified or is null, it defaults to (see lang(5)).

       If  any internationalization variable contains an invalid setting, they
       all default to See environ(5).

   International Code Set Support
       Single- and multibyte character code sets are supported.	 with  a  new‐
       line character, the count will be off by one.

       The  command counts the number of newlines to determine the line count.
       If a text file has a final line that is not terminated with  a  newline
       character, the count will be off by one.

       Print the number of words and characters in

       The following is printed when the above command is executed:

       where  words  is the number of words and chars is the number of charac‐
       ters in



List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net