Dear FSL users,
i am trying to run a multiple subject analysis, therefore, i want to
automate the command eddy_correct in a for loop.
I was already able to realize this, but i still have some trouble with
the filenames, that are getting to long during the various pos-
processing steps.
For example, when i have all the brain extracted pacients data in one
file and i am running the command eddy_correct input output 0:
for j in *; do eddy_correct ${j} ${j}_ecc 0; done
then i get for the output name the whole filename of the input data,
like:
input: pacient1dti.nii
output: pacient1dti.nii_ecc.nii.gz
I rather would just get something like pacient1dti_ecc.nii.gz.
So my question is how i have to change the part "${j}_ecc" to achieve
this?
I tried a long time but without success.
Thanks a lot for further help,
Best regards,
Thomas
|