mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
c070a2aa3e
Rework for Doxygen >1.8. Moved large parts of the documentation to a simplified format, making use of Markdown enhancements and fixing bad long options.
31 lines
763 B
Text
31 lines
763 B
Text
\section count count - count the number of elements of an array
|
|
|
|
\subsection count-synopsis Synopsis
|
|
\fish{syn}
|
|
count $VARIABLE
|
|
\endfish
|
|
|
|
\subsection count-description Description
|
|
|
|
`count` prints the number of arguments that were
|
|
passed to it. This is usually used to find out how many elements an
|
|
environment variable array contains.
|
|
|
|
`count` does not accept any options, including '`-h`'.
|
|
|
|
`count` exits with a non-zero exit status if no arguments were passed
|
|
to it, and with zero if at least one argument was passed.
|
|
|
|
\subsection count-example Example
|
|
|
|
<pre>
|
|
count $PATH
|
|
</pre>
|
|
|
|
returns the number of directories in the users PATH variable.
|
|
|
|
<pre>
|
|
count *.txt
|
|
</pre>
|
|
|
|
returns the number of files in the current working directory ending with the suffix '.txt'.
|