#!/bin/sh search() { local d for d in *; do if [ -d "$d" ]; then (cd "$d" && search) else echo "$(pwd)/$d" fi done } search