To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

echo (command)

From Wikipedia, the free encyclopedia

In computing, echo is a command that outputs the strings that are passed to it as arguments. It is a command available in various operating system shells and typically used in shell scripts and batch files to output status text to the screen[1] or a computer file, or as a source part of a pipeline.

YouTube Encyclopedic

  • 1/5
    Views:
    953
    1 934
    290 526
    426 283
    4 047 821
  • Linux Command-Line Interface (CLI) Tutorial #014 - "echo" command, IO Redirection
  • How to write Unix Shell Command (Echo) in C|Episode 003|C Programming Language Series|Sourabh Choure
  • Keyboards & Command Line Interfaces: Crash Course Computer Science #22
  • Packet Traveling - How Packets Move Through a Network
  • 5 Smart Home Tech (for Amazon Echo, Google Home & Siri!)

Transcription

Implementations

The command is available in the following operating systems:

Many shells, including all Bourne-like (such as Bash[14] or zsh[15]) and Csh-like shells as well as COMMAND.COM and cmd.exe implement echo as a builtin command.

The command is also available in the EFI shell.[16]

History

echo began within Multics. After it was programmed in C by Doug McIlroy as a "finger exercise" and proved to be useful, it became part of Version 2 Unix. echo -n in Version 7 replaced prompt, (which behaved like echo but without terminating its output with a line delimiter).[17]

On PWB/UNIX and later Unix System III, echo started expanding C escape sequences such as \n with the notable difference that octal escape sequences were expressed as \0ooo instead of \ooo in C.[18]

Eighth Edition Unix echo only did the escape expansion when passed a -e option,[19] and that behaviour was copied by a few other implementations such as the builtin echo command of Bash or zsh and GNU echo.

On MS-DOS, the command is available in versions 2 and later.[20]

Nowadays, several incompatible implementations of echo exist on different operating systems (often several on the same system), some of them expanding escape sequences by default, some of them not, some of them accepting options (the list of which varying with implementations), some of them not.

The POSIX specification of echo[21] leaves the behaviour unspecified if the first argument is -n or any argument contain 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 echo implementations are not compliant in the default environment.

Because of these variations in behaviour, echo is considered a non-portable command on Unix-like systems[22] and the printf command (where available, introduced by Ninth Edition Unix) is preferred instead.

Usage examples

C:\>echo Hello world
Hello world

Using ANSI escape code SGR sequences, compatible terminals can print out colored text.

Using a UNIX System III-style implementation:

BGRED=`echo "\033[41m"`
FGBLUE=`echo "\033[35m"`
BGGREEN=`echo "\033[42m"`

NORMAL=`echo "\033[m"`

Or a Unix Version 8-style implementation (such as Bash when not in Unix-conformance mode):

BGRED=`echo -e "\033[41m"`
FGBLUE=`echo -e "\033[35m"`
BGGREEN=`echo -e "\033[42m"`

NORMAL=`echo -e "\033[m"`

and after:

echo "${FGBLUE} Text in blue ${NORMAL}"
echo "Text normal"
echo "${BGRED} Background in red"
echo "${BGGREEN} Background in Green and back to Normal ${NORMAL}"

Portably with printf:

BGRED=`printf '\33[41m'`
NORMAL=`printf '\33[m'`
printf '%s\n' "${BGRED}Text on red background${NORMAL}"

See also

References

  1. ^ Rügheimer, Hannes; Spanik, Christian (September 12, 1988). AmigaDOS quick reference. Grand Rapids, Mi : Abacus. ISBN 9781557550491 – via Internet Archive.
  2. ^ "Multics Commands". www.multicians.org.
  3. ^ "FLEX 9.0 User's Manual" (PDF).
  4. ^ "Manual" (PDF). www.pagetable.com. Retrieved 2020-09-12.
  5. ^ "Z80-RIO OPERATING SYSTEM USER'S MANUAL" (PDF).
  6. ^ Paul S. Dayan (1992). The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. ISBN 0-9519228-0-7.
  7. ^ "Chris's Acorns: Panos". chrisacorns.computinghistory.org.uk.
  8. ^ "FlexOS™ User's Guide" (PDF). Archived from the original (PDF) on 2018-09-14.
  9. ^ "OS/2 Batch File Commands". Archived from the original on 2019-04-14.
  10. ^ "echo". docs.microsoft.com. 2 October 2023.
  11. ^ "reactos/reactos". GitHub. 3 January 2022.
  12. ^ "MPE/iX Command Reference Manual" (PDF). Archived from the original (PDF) on 2018-10-21. Retrieved 2018-10-21.
  13. ^ "Shell - KolibriOS wiki". wiki.kolibrios.org.
  14. ^ "Bash Builtins (Bash Reference Manual)". www.gnu.org.
  15. ^ "zsh: 17 Shell Builtin Commands". zsh.sourceforge.net.
  16. ^ "EFI Shells and Scripting". Intel. Retrieved 2013-09-25.
  17. ^ McIlroy, M. D. (1987). A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 (PDF) (Technical report). CSTR. Bell Labs. 139.
  18. ^ Mascheck, Sven. "echo and printf behaviour". Retrieved 24 July 2016.
  19. ^ "8th Edition Unix echo man page". Retrieved 24 July 2016.
  20. ^ Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN 0-7356-1812-7.
  21. ^ echo: write arguments to standard output – Shell and Utilities Reference, The Single UNIX Specification, Version 4 from The Open Group
  22. ^ "Autoconf documentation on echo portability". Free Software Foundation. Retrieved 24 July 2016.

Further reading

External links

This page was last edited on 15 October 2023, at 16:47
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.