The UNIX and Linux Forums  


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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 11-24-2008
msb65 msb65 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 89
Hi Ikon,

That is interesting that similar code appears to be working differently on our two systems. I am using a Mac running Leopard. I wonder if there are nuances between our bash? On my system there is the directory: /Users/msb65/test_data/Olive

However, the test doesnt error when I substitute a lowercase "o" on "Olive":

$ dir='/Users/msb65/test_data/Olive'
$ if [ -d $dir ]; then echo hello; fi
hello

dir='/Users/msb65/test_data/olive'
$ if [ -d $dir ]; then echo hello; fi
hello

Why is this?

Mike