#! /bin/csh -f set here = `pwd` set ntdir = $workdir/Phase3/gamma2/sk3/nt cd $ntdir set list = `ls *.hbk` cd $here echo "NAME = PSMC" echo "CHAIN -[NAME]" echo "DIR = ${ntdir}" foreach file ($list) echo "CHAIN [NAME] [DIR]/${file}" end echo "cdir //PSMC"