I'm using the Bourne shell to write a CGI script. It's supposed to ask the user for input (their userID) and give them a listing of all the files in their directory. I did all that, but we have both undergrad and grad students in this class, and there's a different directory structure (only difference is that instead of the ugrad directory, it goes to grad. I put in an if statement to test to see whether a ugrad directory existed, and if not, then make student="grad" and eventually print the grad directory. Unfortunately, this if statement does nothing. I don't get any listing. Here is what I have student="ugrad" #if [ -d "/homedir/$student/$fchar/$userid" ] #then #else #student="grad" #fi It's commented out for now, since I can't get it to work, but I was wondering if I was using the correct syntax or if my logic is flawed somewhere. Right now, it works fine for undergrad dir (I tested with my ID) and if I changed the student variable to "grad" it would work for grad students. When I uncomment the previous lines, I don't get any listing whatsoever. Any thoughts?