#!/bin/bash for item in ../* do if [ -d "$item" ] then if [ -f "$item/.plan" ] || [ -f "$item/.project" ] then echo "${item:3}" fi fi done