I am trying to generate feat design files with script, but I am having some trouble.
#!/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.