Hi,
just to resolve, it was mainly the nasty an easy to oversee use of '
instead of `. I myself thus try to use $() instead to avoid this kind of
problems.
cheers,
wolf
On 11/07/13 23:19, Niels Bergsland wrote:
> Just to add to what wolf said,
> putting in an echo can help you track down what the problem is (e.g.
> echo flirt -in ${g} -ref $FSLDIR/data/standard/MNI152_T1_2mm -applyxfm
> -usesqform -out struc/${g} )
>
> That will output the exact command it's trying to run with your $g
> variables expanded.
>
> On Thu, Jul 11, 2013 at 10:06 PM, wolf zinke <[log in to unmask]> wrote:
>> Hi,
>>
>> If you have not set the FSL path correctly and use the $FSLDIR variable
>> instead, you have to specify the bin directory for your function call:
>> '${FSLDIR}/bin/imglob m0wrp*'
>>
>> I hope this fixes it.
>>
>> Good luck,
>> wolf
>>
>>
>>
>> On 11/07/13 21:47, OSKAR WIGELIUS wrote:
>>
>> Hi,
>>
>> still does not work (it looked fine before but didn't check the ouput, there
>> wasn't any). I try:
>>
>> for g in '${FSLDIR}/imglob m0wrp*' ;
>> do flirt -in ${g} -ref $FSLDIR/data/standard/MNI152_T1_2mm -applyxfm
>> -usesqform -out struc/${g};
>> done
>>
>> Output: "Unrecognised option m"
>>
>> Cheers, Oskar
>>
>>
>> 2013/7/11 OSKAR WIGELIUS <[log in to unmask]>
>>> Hi Tim, Chris,
>>>
>>> thanks, it works now. And apologies for spamming. I am obviously getting
>>> tired now, time to leave work...
>>>
>>> Cheers, Oskar
>>>
>>>
>>>
>>> 2013/7/11 Timm Wetzel <[log in to unmask]>
>>>> Dear Oskar,
>>>>
>>>> On 11.07.2013, at 20:37, Oskar W <[log in to unmask]> wrote:
>>>>
>>>>> for g in `$FSLDIR/bin/imglob mwr*` do ;
>>>>> $FSLDIR/bin/flirt -in ${g} -ref $FSLDIR/data/standard/MNI152_T1_2mm
>>>>> –applyxfm -usesqform -out struc/{g}_GM_to_template_GM_mod;
>>>>> done
>>>>>
>>>>> and got the output: "-bash: syntax error near unexpected token `flirt'"
>>>> the error message tries to tell you that the first semicolon is
>>>> misplaced. Move it before the `do´, as in `for … ; do … ; done´. There is
>>>> also a $ missing before {g}_GM_… .
>>>>
>>>>
>>>> Regards,
>>>> Timm
>>>
>>
>
>
|