command-definition.wc.xml Maven / Gradle / Ivy
<?xml version="1.0"?> <command-def xmlns="http://www.unix4j.org/command-def" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.unix4j.org/command-def command-def.xsd"> <command name="wc" class="org.unix4j.unix.Wc" package="org.unix4j.unix.wc"/> <name>wc - word, line, and byte or character count</name> <synopsis>wc [-lwm]</synopsis> <description ref="wc.html"/> <notes> </notes> <methods> <method args="" usesStandardInput="true"> Executes a count of lines, words and chars contained in the standard input and writes them to the standard output. </method> <method args="args" usesStandardInput="true"> One or several counts are executed and written to the standard output. Counts include lines, words and chars (depending on the provided options) and cumulative counts for all the files are displayed on a separate line after the output for the last file if more than one input file is specified. Options can be specified by acronym (with a leading dash "-") or by long name (with two leading dashes "--"). Operands other than the default "--paths" operand have to be prefixed with the operand name. </method> <method args="files" usesStandardInput="false"> Executes a count of lines, words and chars contained in each input file and writes them to the standard output. 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. </method> <method args="options" usesStandardInput="true"> Executes a one or more counts, depending on the given options, in the standard input and writes them to the standard output. </method> <method args="options,files" usesStandardInput="false"> Executes a one or more counts, depending on the given options, in each of the given input files and writes them to the standard output. 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. </method> <method args="options,paths" usesStandardInput="false"> Executes a one or more counts, depending on the given options, in each of the given input files and writes them to the standard output. 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. </method> <!-- NOTES: (a) we can only support this with a new "option" attribute selecting the appropriate option (b) do we really still need this? <method name="wcCountLinesWordsAndChars" args="" usesStandardInput="false"> Executes a count of lines, words and chars in the given input and writes them to the standard output </method> <method name="wcCountLines" args="" usesStandardInput="false"> Executes a count of lines in the given input and writes them to the standard output </method> <method name="wcCountChars" args="" usesStandardInput="false"> Executes a count of chars in the given input and writes them to the standard output </method> <method name="wcCountWords" args="" usesStandardInput="false"> Executes a count of words in the given input and writes them to the standard output </method> --> </methods> <options> <option name="lines" acronym="l"> Executes a count of lines and writes this count to the output. </option> <option name="words" acronym="w"> Executes a count of words and writes this count to the output. A word is a non-zero-length string of characters delimited by white space as defined by {@link Character#isWhitespace(char)}. </option> <option name="chars" acronym="m"> Executes a count of chars and writes this count to the output. </option> </options> <operands default="paths"> <operand name="paths" type="String[]"> Pathnames of the input files; wildcards * and ? are supported; relative paths are resolved on the basis of the current working directory. </operand> <operand name="files" type="java.io.File..."> The input files; relative paths are not resolved (use the string paths argument to enable relative path resolving based on the current working directory). </operand> <operand name="args" type="String..."> String arguments defining the options and operands for the command. Options can be specified by acronym (with a leading dash "-") or by long name (with two leading dashes "--"). Operands other than the default "--paths" operand have to be prefixed with the operand name. </operand> <operand name="options" type="WcOptions"> The options defining command behavior. </operand> </operands> </command-def>