Echo (command)

Echo (command)

In computing, echo is a command in DOS, OS/2, Microsoft Windows, Unix and Unix-like operating systems that places a string on the computer terminal. It is typically used in shell scripts and batch files to output status text to the screen or a file.

Usage example

$ echo This is a test.This is a test.$ echo "This is a test." > ./test.txt$ cat ./test.txtThis is a test.

Some variants of Unix support options such as -n and -e. These are not standard [ [http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html IEEE Std 1003.1, 2004, documentation for echo] ] due to historical incompatibilities between BSD and System V; the printf command can be used in situations where this is a problem.

Implementation example

The echo command can be implemented in the C programming language with only a few lines of code:


#include /* echo command-line arguments; 1st version */int main(int argc, char *argv [] ){ int i; for (i = 1; i < argc; i++) printf("%s%s", argv [i] , (i < argc-1) ? " " : ""); printf(" "); return 0;}

References

External links

* [http://technet.microsoft.com/en-us/library/bb490897.aspx Microsoft TechNet Echo article]

* [http://www.halcode.com/archives/2008/05/04/writing-programs-with-echo-dos Writing programs with Echo (DOS)]

ee also

*List of Unix programs
*List of DOS commands


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Echo (disambiguation) — Echo most commonly refers to Echo (phenomenon), a reflection (and/or repetition) of sound.It may also refer to:Computing* Echo (command), a Unix, DOS and Microsoft Windows command to display a line of text * Echo (framework), a web framework for… …   Wikipedia

  • Echo (phenomenon) — In audio signal processing and acoustics, an echo (plural echoes) is a reflection of sound, arriving at the listener some time after the direct sound. Typical examples are the echo produced by the bottom of a well, by a building, or by the walls… …   Wikipedia

  • COMMAND.COM — Developer(s) Seattle Computer Products, Microsoft Corporation, IBM, Novell and several others. Operating system DR DOS, FreeDOS, MS DOS, Novell DOS, OpenDOS, PC DOS, PTS DOS, ROM DOS, 86 DOS, Microsoft Windows (Windows 95 Wi …   Wikipedia

  • echo — (от англ. echo эхо) команда Unix, предназначенная для отображения строки текста. Команда echo выводит текст (выводит текст на стандартное устройство вывода). Синтаксис echo [ПАРАМЕТР]... [СТРОКА]... Параметры n не выводить в конце символ… …   Википедия

  • Echo (Informatik) — Echo ist ein einfaches allgemeines Konzept in der Informatik, das sich an das akustische Echo anlehnt. Es wird in vielen Werkzeugen eingesetzt, vor allem in der Kommandozeile unter beinahe allen Betriebssystemen, in Programmiersprachen als… …   Deutsch Wikipedia

  • Command.com — Saltar a navegación, búsqueda command.com es el nombre del intérprete de comandos para DOS y versiones de Windows de 16/32bits (95/98/98 SE/Me). Al ser el primer programa que se ejecuta después del inicio, posee también el rol de la configuración …   Wikipedia Español

  • Command.com — Le programme COMMAND.COM est l interpréteur de commandes du système MS DOS. On ne le confondra pas avec cmd.exe, qui est l interpréteur de commande de Windows NT (Windows 2000, Windows XP...) et d OS/2. Les commandes de cmd.exe sont inspirées,… …   Wikipédia en Français

  • command.com — Desarrollador Seattle Computer Products, Microsoft Corporation, IBM, Novell y otros Información general Género Shell …   Wikipedia Español

  • Command (computing) — In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell. Specifically …   Wikipedia

  • Command-line argument parsing — Different Command line argument parsing methods are used by different programming languages to parse command line arguments. Contents 1 Programming languages 1.1 C 1.2 Java 1.3 Perl …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”