cd /mss/mssmisc/pin for i in $(find . -type d -print) do cd /mss/mssmisc/pin/${i} if ! test -f *.sgm then pwd fi done