The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Tcp_conn_req_max_q (CASE-sensitive?) Olli.Lang SUN Solaris 4 09-11-2008 03:03 AM
case sensitive "if [ -e $file ]"? jul Shell Programming and Scripting 2 05-08-2008 08:48 AM
Ignore case sensitive in Case Switch annelisa Shell Programming and Scripting 1 07-13-2006 04:36 AM
how to disable case sensitive on RHEL ? blesets UNIX for Dummies Questions & Answers 2 04-02-2006 09:47 PM
Is Hostname Case sensitive ????? ajphaj UNIX for Dummies Questions & Answers 3 02-16-2006 01:10 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 4.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-24-2008
msb65 msb65 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 89
Check if file is directory (-d) using case sensitive

Hi,

I am writing a bash script. At the beginning of the script there is a user defined variable which is a directory in which processed data will be moved. When running the script I would like to immediately make sure that the directory exists, and if not the script will error. The following code should do that:

OUTDIR='/Users/msb65/test_data'

if [ -d $OUT_DIR ]; then
echo '- OUT_DIR exists'
else
echo; echo; echo 'ERROR: OUT_DIR does not exist'
exit 1
fi

However, this test does NOT seem to be case sensitive. How can I make it so it is? Thanks.

Mike
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:45 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0