#!/bin/tcsh -f set sim = FILES touch out_Stat foreach file ( `ls $sim/snapshot_*`) set moment=`echo $file | awk -F_ '{print $2}'` echo moment= $moment /home/users/aklypin/CODE/PM/PMgalaxyGDG <> out_Stat $moment EOF end exit