#!/bin/ksh for x in *.pl; do if [[ -f "$x" ]]; then exec ./what_you_want_to_do *.pl fi done