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 03-23-2013, 10:41 AM   #16
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware Vector Linux & CentOS
Posts: 4,212
Blog Entries: 1

Rep: Reputation: Disabled

Quote:
Originally Posted by jpollard View Post
-d is not a variable - it is a test - if the name exists, AND it is a directory.


fi is the end of the if block (hence my recommendation to indent...)

Code:
if [ ... ]; then
    ...
elsif [ ... ]; then
    ...
else
    ...
fi
Thanks, I have to trust you and your wisdom because this "test" alludes me and Google more on Bash scripting.
 
Old 03-23-2013, 10:43 AM   #17
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Quote:
Originally Posted by Ztcoracat View Post
Is a directory; but what does the (-d) variable imply or is this actually a flag?
And is (fi) a way to indicate exit?
Just go through:
Code:
~$ man test
Or check here.
 
Old 03-23-2013, 10:46 AM   #18
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware Vector Linux & CentOS
Posts: 4,212
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by shivaa View Post
Just go through:
Code:
~$ man test
Or check here.
Both are helpful; Thanks
 
  


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
Bash problem : -bash: [: /bin/bash: unary operator expected J.A.X Linux - Software 1 09-22-2011 05:52 AM


All times are GMT -5. The time now is 04:33 PM.

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