Hi, yes - that works fine...
Thanks a lot.
Cheers
Thomas
On Thu, 2007-10-04 at 16:47 +0200, Mareike Menz wrote:
> Dear Thomas,
>
> you can also use
>
> for j in `ls` ; do n=${j%.nii} ; eddy_correct $n $n_ecc 0 ; done
>
> % removes all right from %, # would remove the part left...
>
> Greetings,
> Mareike
>
>
>
> Thomas Doring wrote:
> > 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
> >
> >
>
> --
>
> Mareike Menz
> NeuroImage Nord Lübeck
> University Medical Center Hamburg-Eppendorf, Bldg. S10
> Martinistr. 52
> 20246 Hamburg
> Germany
>
> +49 40 42803 3683
> [log in to unmask]
>
> --
>
> () ascii ribbon campaign
> /\ - against html mail
>
>
|