Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
can any body tell me where can i found the source code for echo command. so that i can download it such that it can help me for further studies on echo command
The echo command have two pieces. One is in Linux kernel, other one in shell. So that is where you should be looking.
How does this relate to finding the source code???!!! You seem to be saying that to find the source code, one should look in the kernel or the shell. Please explain.
@mohit*;
A Google search shows first that "echo" is both a BASH built-in, and is also a separate command (/bin/bash). I don't know how they differ.
Either a shell builtin or part of coreutils. It depends on what you are using. So, you either need the sources for your shell or the sources for coreutils.
If I do this, it comes up with /bin/echo. If I then disable /bin/echo, echo still works. I believe that the built-in gets run by default.
Quote:
@pixellany
If it is built in kernel, than he need to downloade source code of kernel and look there. If it is shell, than your link will do.
echo is not built into the kernel. It is built into bash (one option), and also exists as a standalone utility. (My issue with your other post is that you did not answer the question of where to get the source code.)
echo is not built into the kernel. It is built into bash (one option), and also exists as a standalone utility. (My issue with your other post is that you did not answer the question of where to get the source code.)
I did not provided a link to source because I thought he just asks for hint where to look, or what word to type in google. Sorry for not being clear.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.