echo Linux Command Cheatsheet




echo Linux Command used to output text to screen. This is available in most of the operating systems along with Linux systems.

Syntax

echo [option(s)] [string(s)]

Examples

echo Hello World! #=> Hello World!
x=5
echo $x #=> 5
x=8
echo x value is $x #=> x value is 8
echo Hello \nWorld! #=> Hello
                    #   World!

Note: \n is for new line

echo Hello \tWorld! #=> Hello   World!

`Note: \t is for tab

echo * #=> Prints files and folders of current directory
echo *.txt #=> Prints all .txt files from current directory


┬ęCopyright 2020 OneCompiler | Privacy Policy | Terms & Conditions