LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-11-2008, 07:53 AM   #1
sniffer_raghav
Member
 
Registered: Oct 2007
Posts: 34

Rep: Reputation: 15
Question shell variable


sir,
i have a doubt i m using linux since a year and i have writting scripts
.i want you to ask a question.
is dere any reason so that for case it is end with esac anf if is end with fi and then why do is end with done .i m unable to find d answer in books .
so please help me out...
thanking in advance.......
 
Old 06-11-2008, 08:16 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,360
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Quote:
Originally Posted by sniffer_raghav View Post
is dere any reason so that for case it is end with esac anf if is end with fi and then why do is end with done .i m unable to find d answer in books .
I hope I got the question right (I know it's hard when you're used to Internet Messenger or Internet Relay Chat type of talk, but please use proper english) it's just "how things are done": opening a statement means you have to close it. Of course you can use variations on 'test' to avoid some.
 
Old 06-11-2008, 08:34 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
i m unable to find d answer in books .
What books?? Almost any book on Linux scripting will give you the basic syntax rules.

To expand a bit on the previous post, a statement like "if" needs something to tell the interpreter that it is finished. Different languages have their own way of doing this.
 
Old 06-11-2008, 10:55 PM   #4
Kenhelm
Member
 
Registered: Mar 2008
Location: N. W. England
Distribution: Mandriva
Posts: 336

Rep: Reputation: 141Reputation: 141
If the question can be restated as:-
When 'if' ends with 'fi' and 'case' ends with 'esac' why doesn't 'do' end with 'od'?

Then a possible answer is:-
It would clash with the command od.
See man od
 
Old 06-12-2008, 06:34 AM   #5
sniffer_raghav
Member
 
Registered: Oct 2007
Posts: 34

Original Poster
Rep: Reputation: 15
Smile

Quote:
Originally Posted by Kenhelm View Post
If the question can be restated as:-
When 'if' ends with 'fi' and 'case' ends with 'esac' why doesn't 'do' end with 'od'?

Then a possible answer is:-
It would clash with the command od.
See man od
ok thank you sir .
that is what i was asking for .
yes we have od (octal dump)as a command so we can not use it in do .
thank you very much sir.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script Random Variable Daniel Programming 14 12-03-2007 06:00 AM
Test variable is an integer in shell judgex Programming 1 06-03-2006 10:12 PM
variable export in shell MarioT Programming 3 05-17-2006 12:52 AM
Shell Term variable help neilcpp Linux - Software 1 03-15-2006 08:14 AM
[c shell] variable question saiz66 Programming 5 09-29-2004 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration