Echo (command)

Echo is a simple general approach in computer science, which is based on the acoustic echo. It is used in many tools, especially in the command line under almost all operating systems, programming languages ​​as output in command and in networks. The basic operation is the same everywhere, as in the identical mapping in mathematics, it is an input (usually in the form of a string ) received and reissued unchanged. What is more, especially in the network area an important delay between the input and the output or their receiver, as it is also present in the acoustic model. This delay is caused mainly in application areas where it plays a role by data transmission.

Command line and scripting languages

The echo command is available in most command line that will be provided in large programs, especially in operating systems, the standard instruction set. This command is used there for the output of strings and variables on an output device such as the screen or a file. The use can be either directly on the command line or within a shell script - also called batch files with DOS and Microsoft Windows - done. If the user redirects the output to a file, he can use it to create a text file or append the output to an existing text file. Some command line interpreter that support the echo command are bash, csh, command.com, cmd.exe, Windows PowerShell, but also the console of the computer game Half Life.

Some scripting languages ​​that offer an echo command, are not intended for direct use with a command line, but are mainly suitable for use in script files, this includes, for example, PHP.

Under DOS and Windows can be with the echo command and the output of the executed commands on the screen to control, when called from within a batch file. Each line of the file appears again on the screen or other output device, as long as it was not switched off with echo off; echo on turns on the issue again.

Computer communication

In computer networks, this approach is also commonly used. In the Internet protocol suite there is the echo protocol, which is designed for use with an echo - network service. The task of a server that provides this network service, it return the data received from a client is unchanged. The specification takes place in the RFC 862 and RFC 347

Further, the ICMP standard defines two types of messages, among other echo request ( echo request ) and echo reply ( echo reply ). These messages are referred to as Ping or Pong packages and are mainly intended for diagnostic purposes to check the reachability of a computer on the network. Here is to a target computer a message with user data, which are usually filled with letters of the alphabet, sent. The target computer receives this message and sends the same payload unchanged back to the receiver. When the recipient receives the response message, it evaluates for the transmission ( return direction together ) of time required. This happens, for example, in which, in many operating systems as standard supplied with the ping command line utility. The ICMP standard is defined in RFC 792.

Furthermore, the term echo the telnet protocol is used for the option that specifies if the telnet connection on the returned characters to be output or not. Has the option at this point so a similar meaning as the on-and off - parameters at the cmd.exe command echo. Specification in RFC 857

Another vivid example of the application of this concept is the echo - mailer. In this case, each received e- mail will be deleted including header data sent back to the originator of that content.

  • Computer science
296306
de