Solved

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

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This Windows batch file is useful for organizing image files from a digital camera or other source, but can have many other uses.  It simply renames the file(s) to match their create date.  For example, if you took a picture today at 1:40pm and the …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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 this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now