#!/usr/bin/env bash input_dirs="" for dir in $(find /input -type d); do input_dirs="${input_dirs} ${dir}" done ./meshmerge.py /output ${input_dirs}