Solved

What is mean by -d in shell script..?

Posted on 2009-04-01
2
1,383 Views
Last Modified: 2013-12-26
What is mean by -d in shell script ..i have build script which is validating against dirextory..
and  doing like this
                    if[ -d $dir/$relnumber]
                        then

what is -d means here?
0
Comment
Question by:ANISHKA1
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 250 total points
ID: 24038272
Hello ANISHKA1,

-d means - is a directory

Regards,

sunnycoder
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 250 total points
ID: 24038290
Hi,
look at 'man test' to see all operators and functions!
In your case, [ -d $dir/$relnumber] means - Check whether $dir/$relnumber exists and is a directory.
 
wmp
 


 
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Automating/Scheduling SFTP Downloads 4 88
Powershell with multiple commands 2 45
Monitor Aliased network interface bandwitch CentOS 4 91
how to pick specific file from ftp 13 56
Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Utilizing an array to gracefully append to a list of EmailAddresses
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question