DELAPARRA
Index
Color
NL
Category: CLI commands

echo

Explained by Updated

What is echo?

echo: Echo — Print text or variable values to the terminal. echo prints text to the terminal. echo "Deploy finished" prints a message, and echo $HOME prints the value of a variable. It is used constantly in shell scripts: status messages, writing a line to a file with echo "text" >> file, or quickly checking what a variable contains while debugging.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about echo

What should you keep in mind with echo?

A few details save trouble. Use double quotes around variables, as in echo "$path", so spaces and special characters are kept intact. Different systems handle options like -e and -n differently, so for anything beyond simple text, printf is more predictable. And be careful about echoing secrets in CI scripts. Logs are often visible to many people, and most CI systems only mask secrets they know about.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with E

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.