Low Orbit Flux Logo 2 F

Linux Command - echo

echo - print a string of text



echo test
echo "test"
echo $VAR1
echo $PATH
echo "This is a test: $VAR1"
echo "This is a test: ${VAR1}"
echo -e "test\ntest"
echo -e "test\atest"

echo "test" > output.txt
echo "test" >> output.txt

echo > big_log_file

Options:

-n don’t output trailing newline
-e enable backslash escapes
-E disable backslash escapes ( default )

Escape characters:

| backslash  
\a alert (BEL)
\b backspace
\c produce no further output
\e escape
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab
\0NNN byte with octal value NNN (1 to 3 digits)
\xHH byte with hexadecimal value HH (1 to 2 digits)