Hi - I'm a little confused - it's not intended that you "source settings.sh" ? This gets run by the fix script, not by you directly....? Cheers. On 3 Apr 2014, at 23:49, Kathy Pearson <[log in to unmask]> wrote: > For the FIX toolbox version fix1.06, I have noticed that > source settings.sh > gives me the wanted FSL_FIXDIR environment variable only if run from the fix1.06 directory. On one Redhat Linux system, this is okay, assigning FSL_FIXDIR=$PWD after "dirname $0" returns "bash" when the file is sourced, but on other systems FSL_FIXDIR=/home/USERNAME if "dirname $0" returns "-bash" with a dirname unknown -b option error. > > When the settings.sh file is sourced and not executed, the $0 argument is the name of the shell, not the script as might be expected. Can you suggest a replacement line for the code in settings.sh that uses: > FSL_FIXDUR=$( cd ($dirname $0) ; pwd) > > Thanks, > > Kathy Pearson --------------------------------------------------------------------------- Stephen M. Smith, Professor of Biomedical Engineering Associate Director, Oxford University FMRIB Centre FMRIB, JR Hospital, Headington, Oxford OX3 9DU, UK +44 (0) 1865 222726 (fax 222717) [log in to unmask] http://www.fmrib.ox.ac.uk/~steve --------------------------------------------------------------------------- Stop the cultural destruction of Tibet