ECHO(1)

πŸ’… ECHO(1) β€” General Commands Manual πŸŽ€

okay bestie, listen up, because echo is like... the main character of your terminal and you're about to be obsessed πŸ’–


✨ NAME ✨

echo β€” display a line of text. that's it. that's the whole job. iconic behavior honestly πŸ‘‘


🌸 SYNOPSIS 🌸

echo [OPTIONS]... [STRING]...

πŸ¦‹ DESCRIPTION πŸ¦‹

Display a line of text. yep. that's literally the entire description. the bar is on the floor and echo still ate πŸ’…βœ¨


πŸŽ€ OPTIONS πŸŽ€

  • -n β€” do NOT output the trailing newline. it's giving "no newline, no problem" 🚫
  • -e β€” enable interpretation of backslash escapes (we love a backslash that does something) πŸ”₯
  • -E β€” disable interpretation of backslash escapes, and this is the default, so if you do nothing, this is what you get 😌
  • -h, --help β€” print help. your lil rescue blanket 🫢
  • -V, --version β€” print version. flex the build number bestie πŸ’œ
  • [STRING] β€” the text. the content. the moment. 🌈

🌟 EXTRA 🌟

Echo the STRING(s) to standard output. that's the whole vibe: you speak, it repeats, everyone's happy πŸ¦‹

if -e is in effect, these lil escape sequences get recognized, and ngl they're kind of everything:

  • \ β€” backslash
  • \a β€” alert (BEL) β€” a lil attention please 🚨
  • \b β€” backspace
  • \c β€” produce no further output β€” it just stops, no further questions πŸ’€
  • \e β€” escape
  • \f β€” form feed
  • \n β€” new line (the classic) ⭐
  • \r β€” carriage return
  • \t β€” horizontal tab
  • \v β€” vertical tab
  • \0NNN β€” byte with octal value NNN (1 to 3 digits)
  • \xHH β€” byte with hexadecimal value HH (1 to 2 digits)

πŸ‘‘ VERSION πŸ‘‘

v(uutils coreutils) 0.12.0 β€” that's how we're doing it out here πŸ’–


πŸ”₯ EXAMPLES πŸ”₯

print a text message. quick note bestie: quotes are optional:

echo "Hello World"

print a message with environment variables:

echo "My path is $PATH"

print a message without the trailing newline:

echo -n "Hello World"

append a message to the file:

echo "Hello World" >> file.txt

enable interpretation of backslash escapes (aka special characters, aka the fun ones):

echo -e "Column 1\tColumn 2"

print the exit status of the last executed command β€” and heads up, in Windows Command Prompt and PowerShell the equivalent commands are echo %errorlevel% and $lastexitcode respectively:

echo $?

pass text to another program through stdin:

echo "Hello World" | program
🫢 these examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. also, please note that, as uutils is a work in progress, some examples might fail β€” no cap, that's just the truth of it 😭

and that's the whole page babes πŸ’œ this edition landed 2026-09-25, straight from the ECHO(1) manual in General Commands Manual β€” go forth and echo, you absolute queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from