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!
{{Short description|Shell command for writing to standard output}} {{otheruses|Echo (disambiguation)}} {{lowercase}} {{Infobox software | name = echo | logo = | screenshot = Sleepunix.png | screenshot size = | caption = The {{code|echo}} command on [[Unix]] | author = [[Douglas McIlroy]]<br />([[AT&T Bell Laboratories]]) | developer = Various [[open-source software|open-source]] and [[commercial software|commercial]] developers | released = | latest release version = | latest release date = | operating system = [[Multics]], [[Unix]], [[Unix-like]], [[V (operating system)|V]], [[Plan 9 from Bell Labs|Plan 9]], [[Inferno (operating system)|Inferno]], [[FLEX (operating system)|FLEX]], [[TRIPOS]], [[AmigaDOS]], [[Z80-RIO]], [[OS-9]], [[DOS]], [[MSX-DOS]], [[Panos (operating system)|Panos]], [[FlexOS]], [[SISNE plus]], [[OS/2]], [[Microsoft Windows|Windows]], [[ReactOS]], [[HP Multi-Programming Executive|MPE/iX]], [[KolibriOS]], [[SymbOS]] | platform = [[Cross-platform]] | genre = [[Command (computing)|Command]] | license = | website = }} '''<code>echo</code>''' is [[shell (computing)|shell]] [[command (computing)|command]] that writes input text to [[standard output]]. It is available in many [[operating system]] and [[shell (computing)|shells]]. It is often used in a [[shell script]] to [[Logging (computing)|log]] status, provide feedback to the user and for [[debugging]]. For an interactive session, output by default displays on the [[computer terminal|terminal]] screen, but output can be [[Redirection (computing)|re-directed]] to a [[computer file|file]] or [[Pipeline (Unix)|piped]] to another process.<ref name="rugheimer-spanik-amigados" /> Many shells implement <code>echo</code> as a [[shell builtin|builtin command]] rather than an external [[application software|application]] as are many other commands. Multiple, incompatible implementations of <code>echo</code> exist in different shells. Some expand escape sequences by default; some do not; some accept options; some do not. The [[POSIX]] specification<ref>{{man|cu|echo|SUS|write arguments to standard output}}</ref> leaves the behavior unspecified if the first argument is <code>-n</code> or any argument contains backslash characters while the Unix specification (XSI option in POSIX) mandates the expansion of some sequences and does not allow any option processing. In practice, many <code>echo</code> implementations are not compliant in the default environment. Because of these variations, <code>echo</code> is considered a non-portable command<ref name="echo limitations" /> and the [[printf (Unix)|<code>printf</code> command]] (introduced in Ninth Edition Unix) is preferred instead.
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)