LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 12-08-2009, 01:41 AM   #1
mah454
Member
 
Registered: Oct 2009
Location: Iran
Distribution: Debian , Ubuntu , RHEL , CentOS , NetBill
Posts: 134

Rep: Reputation: 15
Path of this command


Hello ...

Where is PATH of this commands:
Code:
while,do,done,for,if,fi,then,case,esac,...
My distro is Ubuntu 9.04

Last edited by mah454; 12-08-2009 at 01:43 AM.
 
Old 12-08-2009, 01:47 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

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.

Kind regards,

Eric
 
Old 12-08-2009, 02:07 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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".
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting the command path shariefbe Linux - Newbie 8 10-20-2009 08:41 AM
how to get the absolute path information of a command from ps command output ratul_11 Linux - General 1 08-06-2008 02:10 AM
exporting PATH for a command arunsri Slackware 4 03-20-2005 05:47 PM
get full path of a command (in C) Hady Programming 9 11-21-2003 10:50 AM
command path question tied2 Linux - Newbie 4 06-24-2002 05:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration