EncyclopediaABC   DEFG   HIJK   LMNO   PQRS   TUVW   XYZOther
 
Home / Encyclopedia / E

Echo (command)

In computing, <code>echo</code> 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.

Usage example

<source lang="bash"> $ echo This is a test. This is a test. $ echo "This is a test." > ./test.txt $ cat ./test.txt This is a test. </source>

Some variants of Unix support options such as <code>-n</code> and <code>-e</code>. These are not standard due to historical incompatibilities between BSD and System V; the <code>printf</code> command can be used in situations where this is a problem.

Implementation example

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

<source lang="c"> 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; } </source>

Source: Wikipedia

Translation of "Echo (command)"

Czech: Echo (Unix), German: Echo (Informatik), Spanish: Echo (informática), French: Echo (Unix), Korean: Echo, Italian: Echo (informatica), Lithuanian: Echo (kompiuteriai), Hungarian: Echo (parancs), Japanese: エコー (コンピュータ), Polish: Echo (CLI), Portuguese: Echo (Unix), Russian: Echo, Ukrainian: Echo, Vietnamese: Echo (lệnh).


show options »   

Search inside:










  More articles in: