Expr
From DssWiki
{{DISPLAYTITLE:{{#if:|:|}}expr}}
echo means several things in computing.
Contents |
[edit] Terminal/program command
echo is a command in Unix (and by extension, its descendants, such as Linux) and MS-DOS that places a string on the terminal. It is typically used in shell scripts and batch programs to output status text to the screen or a file.
$ 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<ref>IEEE Std 1003.1, 2004, documentation for echo</ref> due to historical incompatibilities between BSD and System V; the printf command can be used in situations where this is a problem.
The source code in C of an echo program is:
#include <stdio.h>
/* echo command-line arguments; 1st version */
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;
}
[edit] Ping
echo refers to a ping request. See RFC 792.
[edit] Server
An echo server is a standard service implementing the ECHO protocol that runs on TCP port 7. Intended for testing purposes, it replies to all packets with a packet containing the same data. It is rarely used in practice.
[edit] Other Languages
echo is also a command in programming languages such as PHP <ref>PHP Manual: echo</ref> to output one or more strings.
[edit] References
{{ #ifeq: 100% | 100% | <references/> |
{{#if: |
Unix command line programs and builtins (more) | |||
| File and file system management: | cat | chattr | cd | chmod | chown | chgrp | cksum | cmp | cp | du | df | file | fsck | fuser | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
| Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
| User Management/Environment: | env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write | ||
| Text processing: | awk | comm | cut | ed | ex | fmt | head | iconv | join | less | more | paste | pg | sed | sort | tac | tail | tr | uniq | wc | xargs | ||
| Shell programming: | basename | echo | expr | false | printf | test | true | unset | Printing: | lp |
| Communications: inetd | netstat | ping | rlogin | traceroute | Searching: find | grep | strings | Miscellaneous: banner | bc | cal | dd | man | size | yes | |
