Dear freesurfers.

I'm using freesurfer for two weeks. I'm currently trying to make a script to get asegstats resultats for >100 patients.

I did this script in tcsh : 

foreach filename (t1_????????)
asegstats2table --subjects ${filename} \
  --segno 12 18 14\
  --tablefile asegstats.txt  
end

The problem is that at each loop, the n+1 subject replace the n subject, so at the end I only have the asegstats for the last subject.

When I am replacing t1_???????? (it's a wild card) by t1_63537193 t1_18394856 the result is fine 

so the question is : how to make a loop without over writing the n result by the n+1 result

Thanks very much for you help

Sincerely yours,

Charles Laidi