echo

v0.0.14
echo [OPTIONS]... [STRING]...

display a line of text

Options

--help, -h

Print help information

--version, -V

Print version information

-n

do not output the trailing newline

-e

enable interpretation of backslash escapes

-E

disable interpretation of backslash escapes (default)

Examples

Print a text message. Note: quotes are optional:

echo "{{Hello World}}"

Print a message with environment variables:

echo "{{My path is $PATH}}"

Print a message without the trailing newline:

echo -n "{{Hello World}}"

Append a message to the file:

echo "{{Hello World}}" >> {{file.txt}}

Enable interpretation of backslash escapes (special characters):

echo -e "{{Column 1\tColumn 2}}"

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.