#!/bin/sh for t in $1* do if [ -e $t ] then if [ -e $t/Post/allidl.pro ] then cd $t/Post idl allidl.pro cd ../../postpost fi fi done