AFNI Nation,
This is a combination of two questions I have asked in the past.
I know that 3dcalc can use shell variables for assignment (such as 3dcalc -a "$shell_variable" -expr 'step(a)' -prefix output_dataset) and that certain programs, like 3dmaskdump, can create datasets on the fly by nesting 3dcalc commands (such as 3dmaskdump -mask '3dcalc -a data_set+orig. -expr step(a))' stuff+orig.).
The question now becomes, how do I call upon shell variables within nested 3dcalc commands (using BASH). I thought it would something like...
3dmaskdump -mask '3dcalc -a "$shell_variable" -expr (step(a))' stuff+orig. > stuff.1D
but AFNI is reporting that the dataset "$shell_variable" cannot be located - essentially that AFNI is looking for a file called "$shell_variable" instead of evaluating the variable.
Methinks this mostly a Unix question concerning the interplay of various quotation marks.
-Ariel