Advanced Usage of echo command
NarendraP
Learn How to Automate Common Tasks with Bash Shell Scripting
Advanced Usage of echo command
echo command is used to display string/message or variable value or command result.
Simple syntax:
echo message/string
echo “message/string”
echo “message/string with some variable $xyz”
echo “message/string/$variable/$(command)”
Advanced usage (to execute escape characters):
echo -e “Message/String or variable”
Escape Characters:
\n New Line
\t Horizantal Tab
\v Vertical Tab
\b Backspace
\r Carriage Return etc…
To display message in colors.
echo -n “message/string/$variable/$(command)”
Learn How to Automate Common Tasks with Bash Shell Scripting
Thank you