Bash Shell Script not running on any terminals

Summary of what happened:

I got this script from Andre Jahn GitHub (
I tried running bash but I got no output. Then I ran bash -x

Command used (and if a helper script was used, a link to the helper script or the command generated):

The first command I ran was bash I got no output. Then I ran ./ and still got no output. Finally I ran bash -x and got:

+ bids_root_dir=/home/clara/Desktop/Flanker
+ subj=08
+ nthreads=4
+ mem=20
+ container=docker
++ echo 20
+ mem=20
++ echo 15000
+ mem_mb=15000
+ export FS_LICENSE=/home/clara/Desktop/Flanker/derivatives/license.txt
+ FS_LICENSE=/home/clara/Desktop/Flanker/derivatives/license.txt
+ '[' docker == singularity ']'


I am using a Windows 11 Pro computer running Ubuntu 22.04.3 LTS on Windows PoweShell. I also have wsl version:

Environment (Docker, Singularity, custom installation):

I used Python to install fmriprep but I have Docker.

Data formatted according to a validatable standard? Please provide the output of the validator:

Yes the data is BIDS validated but my concern is the script.

Relevant log outputs (up to 20 lines):

#Template provided by Daniel Levitas of Indiana University
#Edits by Andrew Jahn, University of Michigan, 07.22.2020

#User inputs:
mem=20 #gb
container=docker #docker or singularity


#Convert virtual memory from gb to mb
mem=`echo "${mem//[!0-9]/}"` #remove gb at end
mem_mb=`echo $(((mem*1000)-5000))` #reduce some memory for buffer space during pre-processing

#export TEMPLATEFLOW_HOME=$HOME/.cache/templateflow
export FS_LICENSE=$HOME/Desktop/Flanker/derivatives/license.txt

#Run fmriprep
if [ $container == singularity ]; then
  unset PYTHONPATH; singularity run -B $HOME/.cache/templateflow:/opt/templateflow $HOME/fmriprep.simg \
    $bids_root_dir $bids_root_dir/derivatives \
    participant \
    --participant-label $subj \
    --skip-bids-validation \
    --md-only-boilerplate \
    --fs-license-file $HOME/Desktop/Flanker/derivatives/license.txt \
    --fs-no-reconall \
    --output-spaces MNI152NLin2009cAsym:res-2 \
    --nthreads $nthreads \
    --stop-on-first-crash \
    --mem_mb $mem_mb \
  fmriprep-docker $bids_root_dir $bids_root_dir/derivatives \
    participant \
    --participant-label $subj \
    --skip-bids-validation \
    --md-only-boilerplate \
    --fs-license-file $HOME/Desktop/Flanker/derivatives/license.txt \
    --fs-no-reconall \
    --output-spaces MNI152NLin2009cAsym:res-2 \
    --nthreads $nthreads \
    --stop-on-first-crash \
    --mem_mb $mem_mb

Screenshots / relevant information:

This backslash is preventing the else from being evaluated.

Thank you! I changed that but now its giving me the following error:

That error probably means the fs license file is not found at the location specified. Also in the future if you can post the text of the error message instead of the screenshot that is easier to read. And format it as code by surrounding it in tick marks or using </> button in the text editor. Additionally the —fs-no-recon all flag is not recommended, and you should specify a working directory with the -w argument.