ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahz_5.4.0.1/wc.htm

91 lines
2.3 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=utf-8">
<title>wc - Word, line and byte/character count</title>
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</HEAD>
<body bgcolor="#FFFFFF">
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h2>wc - Word, line and
byte/character count</h2>
<p><strong>Synopsis</strong></p>
<p><strong>wc [-c | -m] [-lw]</strong> [<em>file</em> ...]</p>
<p><strong>Description</strong></p>
<p>The <strong>wc</strong> utility displays the number of lines,
words, and bytes contained in each input <em>file</em> (or standard
input, by default) to standard output. A line is defined as a
string of characters delimited by a newline character. A word is
defined as a string of characters delimited by white space
characters. If more than one input file is specified, a line of
cumulative counts for all the files is displayed on a separate line
after the output for the last file.</p>
<p><strong>Options</strong></p>
<dl>
<dt><strong>c</strong></dt>
<dd>Write to standard output the number of bytes in each input
file.</dd>
<dt><strong>l</strong></dt>
<dd>Write to standard output the number of lines in each input
file.</dd>
<dt><strong>m</strong></dt>
<dd>Write to standard output the number of characters in each input
file.</dd>
<dt><strong>w</strong></dt>
<dd>Write to standard output the number of words in each input
file.</dd>
</dl>
<p><strong>Operands</strong></p>
<p>When an option is specified, <strong>wc</strong> only reports
the information requested by that option. The default action is
equivalent to specifying all of the flags.</p>
<p>If no <em>files</em> are specified, the standard input is used
and no file name is displayed.</p>
<p><strong>Exit Status</strong></p>
<ul>
<li>0 when successful</li>
<li>&gt;0 when an error occurred</li>
</ul>
<p><strong>Related information</strong></p>
<ul>
<li><a href="cut.htm">cut - Cut out selected fields of each line of
a file</a></li>
<li><a href="grep.htm">grep - Search a file for a pattern</a></li>
<li><a href="tr.htm">tr - translate characters</a></li>
</ul>
<!-- end ibmbody========================================================= -->
</body>
</html>