In sum, verbosity makes the command-line interface (CLI) tool display more detailed information than usual. Quietness is the opposite, in which CLI displays fewer details or nothing.
In a well-written CLI tool, there is often an option, such as --verbose
or its abbreviated version -v
, to enable the verbose mode. This mode can be talkative to either the standard output and/or to the standard error. When enabled, this mode prints errors, warnings, debug information, etc. A CLI tool may suggest a different level of wordiness, for instance with the options -v
, -vv
, or more -vvv
.
On the opposite hand, the option -q
or -s
silences or quiets the CLI tool output.
We will focus on the following command:
curl www.example.com 2>&1 | wc -l
curl
command is a famous command that simply retrieves data served on a sample website, here www.example.com
, and display it to the standard output.2>&1
means the content of the standard 2
1
>
.&
symbol stands for: the variable name before and after the symbol (2
and 1
) are considered file descriptors and not filenames.curl www.example.com 2>&1
) will be processed using wc -l
.wc
is a tool that counts newlines, words, and bytes – with the option -l
, it will count the output lines.In short, the previous command will count the number of lines retrieved from the example website, including possible errors.
As you can see, the number of counted lines differs depending on the use, or not, of -s
and -v
.
Give it a try on your terminal!