#!/bin/tcsh -f set dd = $cwd:t set flist = ( *29{0,9}Two.txt ) cd .. foreach n ( $flist ) ./cred2t < $dd/$n > $dd/${n:r}.credibility end