#!/bin/bash cd problems for f in */; do dir=${f%*/} if [ -d ${dir} ]; then echo "" echo "Running Problem: $dir" cd $dir ./run.sh cd .. fi done