View Full Version : question about testing in shell programming

04-07-2008, 10:00 PM
I have 2 different directories. The first has 2 sub-folders A and B. The second as 2 sub-folders C and D and script named "script".There is a code of "script" to list 2 sub-folders C and D

for file in *
do [ -d $file ] && echo $file

I would like to ask how can I make a change if I would like to list 2 sub-folders A and B in the first directory ( using "script" )

04-07-2008, 11:18 PM
find .. -type d