The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-30-2007
philplasma's Avatar
philplasma philplasma is offline
Registered User
  
 

Join Date: May 2007
Location: Quebec
Posts: 18
how to check if masked directory exists?

I'm trying to write a script that identifies whether a directory of the form AWL.????????.IP exists. I have one that exists which is AWL.05301032.IP.

When I test like this: If [[ -d AWL.05301032.IP ]]

I get true, but when I test like this:
If [[ -d AWL.????????.IP ]]
Or like this
If [[ -d AWL.*.IP ]]
Or any other variation of wild cards, I get false.

Is there a way for me to check for the presence of a directory that uses a mask?

Thanks for any help that can be provided!

Phil Plasma