I\'m writing a shell script that looks like this:
for i in $ACTIONS_DIR/* do if [ -x $i ]; then exec $i nap
exec replaces the shell process. Remove it if you only want to call the command as a subprocess instead.
exec