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
-vv, or more
On the opposite hand, the option
-s silences or quiets the CLI tool output.
We will focus on the following command:
curl www.example.com 2>&1 | wc -l
curlcommand 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>&1means the content of the standard
&symbol stands for: the variable name before and after the symbol (
1) are considered file descriptors and not filenames.
curl www.example.com 2>&1) will be processed using
wcis 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
Give it a try on your terminal!
View all Courses