foreach file (*_2_*.mnc.gz) foreach? mincinfo -attvalue patient:full_name -attvalue patient:sex -attvalue patient:birthdate -attvalue study:start_time -error unknown $file >> mri_info.txt foreach? end # Now, you just have to figure out how to insert the "no new line" switch! Using mincextract to find out the nCi/cc value at a certain voxel location in a minc file. Note that although voxel coords are given in x,y,z order in register, for mincextract the coords are given in the slowest to fastest varying (change in x, y or z) which, in this case is y,z,x - because the data is acquired in the transverse plane (?). You can acquire this information using foreach: bottom:/usr/people/kate>foreach file (../../results2/resample/*[0-9].mnc) foreach? echo $file : `mincextract -start 25,9,46 $file` foreach? end ../../results2/resample/moran_karen_199810051109.mnc : 141.56818188133286 ../../results2/resample/moran_karen_199810051119.mnc : 87.078541151364533 ../../results2/resample/moran_karen_199810051130.mnc : 159.48699017787706 ../../results2/resample/moran_karen_199810051141.mnc : 164.3887208664656 ../../results2/resample/moran_karen_199810051151.mnc : 116.43663724804667 ../../results2/resample/moran_karen_199810051202.mnc : 150.72670638805363 ../../results2/resample/cook_susannah_199809171002.mnc : 149.69252237603371 ../../results2/resample/cook_susannah_199809171013.mnc : 95.052633991517752 ../../results2/resample/cook_susannah_199809171023.mnc : 136.00171644479769