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.
These are not commands, they are loops used in scripts and programming tasks. Have a look at Bash Guide for Beginners for more detailed explanation. If you want to find the path to a command, like rm for example you can use:
Code:
which <commandname>
and it will show you its path. But gain, what you're stating here are not commands. They are built-in in the bash shell for one.
They are not commands by shell keywords, as shown by the type command
Code:
c:~/d/src/linux-2.6.29.6$ type while do done for if fi then case esac
while is a shell keyword
do is a shell keyword
done is a shell keyword
for is a shell keyword
if is a shell keyword
fi is a shell keyword
then is a shell keyword
case is a shell keyword
esac is a shell keyword
According to the Linux Documentation Project: "A keyword is a reserved word, token or operator. Keywords have a special meaning to the shell, and indeed are the building blocks of the shell's syntax. As examples, for, while, do, and ! are keywords. Similar to a builtin, a keyword is hard-coded into Bash, but unlike a builtin, a keyword is not in itself a command, but a subunit of a command construct".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.