0% found this document useful (0 votes)
228 views3 pages

Advanced Echo Command in Bash Scripting

The document discusses advanced usage of the echo command in Bash shell scripting. It explains that echo can display strings, variables, and command results. Using -e with echo enables escape character interpretation for formatting text with new lines, tabs, etc. Color output is also possible with echo. The advanced echo options allow automating tasks by programmatically generating formatted output.

Uploaded by

Yegnasivasai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
228 views3 pages

Advanced Echo Command in Bash Scripting

The document discusses advanced usage of the echo command in Bash shell scripting. It explains that echo can display strings, variables, and command results. Using -e with echo enables escape character interpretation for formatting text with new lines, tabs, etc. Color output is also possible with echo. The advanced echo options allow automating tasks by programmatically generating formatted output.

Uploaded by

Yegnasivasai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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

You might also like