#!/bin/sh -e nondot() { find $1 -mindepth 1 -maxdepth 1 -type d -not -name ".*" | while read d ; do [ -e $d/run ] && echo ${d#./} || nondot $d done } nondot . | sort