Thanks, Mark. I changed “end” to “done” (see below) but I'm still having some trouble.
[mmur059@Ironman1 significant_clusters]$ sh rx
rx: line 5: unexpected EOF while looking for matching ``'
rx: line 9: syntax error: unexpected end of file
#!/bin/bash
for n in `cat mask` ; do
base=`echo $n | sed 's/.\{7\}$//'
for ff in `ls *_thr0point95.nii.gz` ; do
ffbase=`echo $ff | sed 's/_thr0point95.*$//'`
fslmaths ${ffbase}_thr0point95.nii.gz -mas $n ${ffbase}_thr0point95_${base}
done
done
Meg
|