Linux.com

echo

Link to this post 13 May 09

can anyone plz tell me how does echo command display a text... i mean what is its internal working?

plz gv me source code for echo command...


thank you.... waiting for reply....

Link to this post 13 May 09

You should be able to get to the source code of echo within the source code of whatever shell you are using.

BKP

Link to this post 14 May 09

The echo command simply writes output to what is called standard output (stdout), although like many other commands, output can easily be redirected to a file or a device.

As noted, the source code for echo ought to be readily available anywhere you get a binary distribution, because one of the stipulations of making the software available is that the source code must be redistributed as well.

Link to this post 14 May 09

gr8linux wrote:

can anyone plz tell me how does echo command display a text... i mean what is its internal working?

plz gv me source code for echo command...


thank you.... waiting for reply....

Some Linux/Unix commands are "external" programs/scripts/applications/etc from the shell and others are part of the shell. The echo command is part of the the shell and is an "internal" command.

Link to this post 15 May 09


Some Linux/Unix commands are "external" programs/scripts/applications/etc from the shell and others are part of the shell. The echo command is part of the the shell and is an "internal" command.

"echo" is also included as an external command into GNU coreutils and may be different from the shells echo


$ dlocate /bin/echo
coreutils: /bin/echo
$ LANG=C /bin/echo --help
Usage: /bin/echo [OPTION]... [STRING]...
---------------8<-------------------
NOTE: your shell may have its own version of echo, which usually supersedes
the version described here. Please refer to your shell's documentation
for details about the options it supports.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board