[PLUG] source code of echo command...
netvaibhav at gmail.com
Fri Jul 27 20:43:40 PDT 2007
On 7/27/07, Sameer Oak <sameer.oak at gmail.com> wrote:
> Where can I find source code of "echo" command?
Here's a minimal echo that does not handle options (-n, -e, etc.)
int main(int argc, char *argv)
for (i = 1; i < argc; i++) printf("%s ", argv[i]);
echo command is nothing but printing of its arguments.
Note: above program not tested. Also has an obvious bug: prints an
extra space at the end if it has 1 or more arguments (I just wanted to
keep it simple).
More information about the plug-mail