*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> wc (1)              
Title
Content
Arch
Section
 

Contents


WC(1)									 WC(1)


NAME    [Toc]    [Back]

     wc	- word,	line and byte or character count

SYNOPSIS    [Toc]    [Back]

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

DESCRIPTION    [Toc]    [Back]

     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    [Toc]    [Back]

     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    [Toc]    [Back]

     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    [Toc]    [Back]

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

INPUT FILES    [Toc]    [Back]

     The input files may be of any type.






									Page 1






WC(1)									 WC(1)


ENVIRONMENT VARIABLES    [Toc]    [Back]

     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.

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

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

     LC_MESSAGES
	  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    [Toc]    [Back]

     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    [Toc]    [Back]

     Used only for diagnostic messages.

OUTPUT FILES    [Toc]    [Back]

     None.

EXIT STATUS    [Toc]    [Back]

     The following exit	values are returned:
     0	 successful completion
     >0	 an error occurred


									PPPPaaaaggggeeee 3333
[ Back ]
 Similar pages
Name OS Title
wc OpenBSD word, line, and byte or character count
wc FreeBSD word, line, character, and byte count
cksum Tru64 Displays the checksum and byte count of a file
xlate_pro_disk_header IRIX get translation byte stream block count
sum HP-UX print checksum and block or byte count of file(s)
putw Tru64 Write a byte or a word to a stream
putchar_unlocked Tru64 Write a byte or a word to a stream
putchar Tru64 Write a byte or a word to a stream
getw Tru64 Get a byte or word from an input stream
getc_unlocked Tru64 Get a byte or word from an input stream
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service