Hello,
You can add an echo to the start of the command to just print out what the loop is trying to do - e.g. what is printed out for:
for n in *; do echo fslstats ${n} -l 9.5 -u 10.5 -V; done
Kind Regards
Matthew
--------------------------------
Dr Matthew Webster
FMRIB Centre
John Radcliffe Hospital
University of Oxford
> On 25 Sep 2017, at 15:00, Sharon Geva <[log in to unmask]> wrote:
>
> Hi,
>
> I ran fslfirst on a group of participants and now I'm trying to get volumes of a specific subcortical structure in a batch.
>
> I tried (example for L thalamus):
> for n in *; do fslstats ${n} -l 9.5 -u 10.5 -V; done
> for n in *; do fslstats *t1_all_fast_firstseg.nii.gz -l 9.5 -u 10.5 -V; done
>
> And some variations on these, but I cannot get it to work. This is probably a basic scripting question, but i will be grateful for any help.
>
>
> All ran within the directory of the analysis.
> Files are named: *t1_all_fast_firstseg.nii.gz
>
>
> Thanks,
>
> Sharon
|