Hi all, I’m having a hell of a time trying to just get feat to work within a simple shell script (Added below, just in case I’m doing something dumb). feat works perfectly fine from the GUI, and even if I feed feat an .fsf file through the command line. However, through bash, I get a simple error message:
feat: command could not be found
This sounded like a PATH issue to me, so I double-check both .bashrc and .profile and, sure enough, had the fsl path defined in both. echo $PATH suggests fsl is working fine:
echo $PATH
/usr/local/fsl/bin:usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
I reinstalled fsl again after that. I also ran it as sudo and I ensured I had the proper permissions to read write and execute in all relevant directories using chmod, and still nothing. In addition, I also tried running the feat command with an fsl6.0- prefix because I found that mentioned in a Stack Overflow thread.
Any ideas? Any advice is highly appreciated!
# Creating a for-loop to cycle through participants
for ID in ${SUBJECTS} ; do
SUBJ="sub-${ID}"
# Specifying Directory
cd
echo "===> Starting processing of ${SUBJ}"
# DERIV is the output for our preprocessed data
cd ${DERIV}/pipeline_0/fmriprep/${SUBJ}
# Creating a folder for each participant to house .fsf's
sudo mkdir DesignFiles
cd DesignFiles
# Creating a for-loop to cycle through runs
# NRUNS defines the number of runs in dataset
for RUN in `seq -w 1 ${NRUNS}` ; do
# Copy the design files into the subject directory to be modified
cp ../../../../../rawdata/code/DesignFiles/design_run${RUN}.fsf \
design_run${RUN}.fsf
# Replacing subject ID in each file
# We are using the | character to delimit the patterns
sed -i "s|CU10978|${ID}|g" design_run${RUN}.fsf
# Now everything is set up to run feat
feat design_run${RUN}.fsf
done
echo
done
echo