Print

Print


Hi Greg,
thanks for your suggestion. Indeed /bin/sh is not the GNU bash shell on my
Solaris system.
Thanks,
Michela



On 4/23/08, Gregory Lee <[log in to unmask]> wrote:
>
> Michela,
>
>   I think the problem is that /bin/sh on Solaris is probably the original
> Bourne shell, not the GNU bash shell (Bourne-Again Shell) commonly used for
> /bin/sh in linux distributions.  Apparently some of the FSL scripts require
> extended syntax that is only supported by bash shell.
>
>   I had the same errors at one point on Ubuntu linux.  On Ubuntu versions
> since 6.10 /bin/sh links to dash instead of bash by default.  I would get
> the same failures as you mentioned.  Changing the /bin/sh link to point to
> /bin/bash instead of /bin/dash fixed the problem for me.
>
> - Greg
>
>
> > However, I now fixed the problem by changing the shell from:
> >
> > /bin/sh
> >
> > to
> >
> > /bin/bash
> >
> > in the following scripts:
> >
> > fsl_sub
> > bedpostx
> > bedpostx_postproc.sh
> > bedpostx_preproc.sh
> > bedpostx_datacheck
> > bedpostx_single_slice.sh
> >
> > After these changes, I re-run the evaluation for all FSL programs and it
> > seemed to work fine. I reported the output below.
> > Don't know if this makes sense. /bin/sh on solaris was not able to
> > interpret some command in the above files. Here is just one example of what
> > I mean (referring to FSLDIR/bin/bedpostx):
> >
> > sh couldn't recognize this statement:
> >
> > if [ ! -e ${subjdir}/bvecs ]; then
> >
> > but would work with this:
> >
> > if [ ! -f ${subjdir}/bvecs ]; then
> >
> > If you have any idea why this happens, it would be very helpful for me!
> > Thanks,
> > Michela
> >
> >