Share on Facebook Share on Twitter Email
Answers.com

Echo

 
Wikipedia: Echo (command)

In computing, echo is a command in DOS, OS/2, Microsoft Windows, Singularity, 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.

Contents

Usage example

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

Some variants of Unix support options such as -n and -e. These are not standard[1] 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 <stdio.h>
/* 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("\n");
  return 0;
}

References

External links

See also


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Shopping: Echo
Top
 
 
Learn More
applause
Echoklavier
depth sounder

Why animals echo? Read answer...
How does an echo happen? Read answer...
What is the pronunciation for echo? Read answer...

Help us answer these
WHo is echo cabinboy?
What is echo formatation?
What is the echo tourist?

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Echo (command)" Read more