Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


wc command (counts the number of bytes, lines, characters, and words in files)

Organization of this page

Format

wc [-c] [-l] [-m] [-w] [path-name ...]

Description

This command counts the number of bytes, lines, characters, and words in files. Depending on the options that are specified, the counts of the numbers of lines, words, characters, and bytes are displayed in front of the name of each input file.

Arguments

-c

Specifies that the number of bytes in an input file is to be output to the standard output.

-l

Specifies that the number of lines in an input file is to be output to the standard output. The number of lines is determined by the number of end-of-line codes.

-m

Specifies that the number of characters in an input file is to be output to the standard output. A multibyte character is counted as a single character.

-w

Specifies that the number of words in an input file is to be output to the standard output. The number of words is determined by the number of character strings delimited by a space, tab, or end-of-line code.

path-name

Specifies the name of an input file. If path-name is not specified or is specified as -, the standard input is read.

Return codes

Return code

Meaning

0

Normal termination

1 or greater

Error termination

Notes

Usage examples