I suspect your problem is that there's no whitespace between your lines. Which is to say, when you write this:
-dset 1 1 1 '3dcalc(...)'\
-dset 1 2 1 '3dcalc(...)'
the shell is removing the backslash-newline pair to get this:
-dset 1 1 1 '3dcalc(...)'-dset 1 2 1 '3dcalc(...)'
+----------------+
all one word
If this is indeed the problem, the name of the dataset that AFNI is choking on will end with "-dset", and you can fix it by adding a space before the backslash (or at the beginning of the next line, or both).
Also, while this is probably not the cause of
this error, in general you shouldn't use quotes
inside the 3dcalc( ... ) dataset:
Quoted Quoted Quoted
+-----------+ +----+ +------------+
3dTcat '3dcalc( -a 'fred+orig' -b 'ginger+orig[0]' -expr a*b )'
^^^
will blow up under tcsh or under bash with the failglob option set because the subbrick selector isn't quoted.
Because the 3dcalc(...) string is parsed by AFNI and not the shell, the solution to this is to leave the inner quotes off, not to change them to double quotes:
shell sees this as one word
+--------------------------------------------------+
3dTcat '3dcalc( -a fred+orig -b ginger+orig[0] -expr a*b )'
++ +-------+ ++ +------------+ +---+ +-+
AFNI splits this into six words
This means that it's not possible to use a dataset with a space in its name in an embedded 3dcalc(...) command.
ijs
Edited 1 time(s). Last edit at 05/06/2015 05:51PM by Isaac Schwabacher.