Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Echo (command)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== <syntaxhighlight lang="doscon"> C:\>echo Hello world Hello world </syntaxhighlight> Using [[ANSI escape code]] ''SGR'' sequences, compatible terminals can print out colored text. Using a [[UNIX System III]]-style implementation: <syntaxhighlight lang="bash"> BGRED=`echo "\033[41m"` FGBLUE=`echo "\033[35m"` BGGREEN=`echo "\033[42m"` NORMAL=`echo "\033[m"` </syntaxhighlight> Or a Unix Version 8-style implementation (such as Bash when not in Unix-conformance mode): <syntaxhighlight lang="bash"> BGRED=`echo -e "\033[41m"` FGBLUE=`echo -e "\033[35m"` BGGREEN=`echo -e "\033[42m"` NORMAL=`echo -e "\033[m"` </syntaxhighlight> and after: <syntaxhighlight lang="bash"> echo "${FGBLUE} Text in blue ${NORMAL}" echo "Text normal" echo "${BGRED} Background in red" echo "${BGGREEN} Background in Green and back to Normal ${NORMAL}" </syntaxhighlight> Portably with <code>printf</code>: <syntaxhighlight lang="bash"> BGRED=`printf '\33[41m'` NORMAL=`printf '\33[m'` printf '%s\n' "${BGRED}Text on red background${NORMAL}" </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)