User Tools

Site Tools


bash:output:display_output

BASH - Output - Display output

The echo command is used for displaying information in bash.

It is similar to the C function ‘printf’ and provides many common options, including escape sequences and re-direction.

#!/bin/bash
echo "Printing text"
echo -n "Printing text without newline"
echo -e "\nRemoving \t special \t characters\n"

NOTE: The -e option is used for telling echo that the string passed to it contains special characters and requires extended functionality.

bash/output/display_output.txt · Last modified: 2021/01/26 16:26 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki