Hi FSLers,

I am trying to generate feat design files with script, but I am having some trouble. 

For my Sample.fsf:
-4D input file path is: /cluster/abc/5/ABC/analyses/Jodi/paradigm/data/###SUB###/data/beauty01_func_orient 
-main structural image path is : /cluster/abc/5/ABC/analyses/Jodi/paradigm/data/###SUB###/data/struc_orient_brain
-output file path is: /cluster/abc/5/ABC/analyses/Jodi/paradigm/results/Subjects/

My script is as follows:

#!/bin/csh
#
cd /cluster/abc/5/ABC/analyses/Jodi/paradigm/design/Subjects

foreach subject ( ABC_DEF01 ABC_HIJ02 ABC_KLM03 )
 sed -e 's/###SUB###/${subject}/g' Sample.fsf  > ${subject}-paradigm-01.fsf
end

Now, when I run this script, I do get ABC_DEF01-paradigm-01.fsf ABC_HIJ02-paradigm-01.fsf and ABC_KLM03-paradigm-01.fsf. However, when I try to load each design file to review on Feat gui, I get the following error:

Loading FEAT setup file /cluster/pgp/5/PGP/analyses/Jodi/beauty/design/Subjects/ABC_DEF01-paradigm-01.fsf
Error in startup script: can't read "subject": no such variable
    while executing
"set feat_files(1) "/autofs/cluster/pgp_005/PGP/analyses/Jodi/beauty/data/${subject}/data/beauty01_func_orient""
    (file "/cluster/pgp/5/PGP/analyses/Jodi/beauty/design/Subjects/ABC_DEF01-paradigm-01.fsf" line 272)
    invoked from within
"source ${filename}"
    (procedure "feat5:load" line 25)
    invoked from within
"feat5:load $w 1 $inputname"
    (procedure "feat5" line 424)
    invoked from within
"feat5 .r"
    invoked from within
"if { ! [ info exists INGUI ] } {
    wm withdraw .
    feat5 .r
    tkwait window .r
}"
    (file "/usr/pubsw/packages/fsl/current/tcl/feat.tcl" line 514)
    invoked from within
"source ${FSLDIR}/tcl/${origname}.tcl"
    (file "/usr/pubsw/packages/fsl/current/bin/Feat" line 22)

I would appreciate if anyone can let me know how the script needs to be modified.

Thank you all in advance.

Sang


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.