#!/bin/tcsh -f foreach com (`ls | grep "\.txt" | cut -d . -f 1`) source $com.txt | diff $com.out - echo "$com -> $?" end