Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2009-04-01
2
1,391 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to remove speical characters from a file name 8 61
listing unique file prefixes in a directory Linux 1 65
Remote install of MSI file 4 51
Shell script issue 4 37
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

861 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