Skip to content

Instantly share code, notes, and snippets.

@tahaozket
Created August 27, 2021 08:57
Show Gist options
  • Save tahaozket/ba24e33e4183257024ee7019c0e87f4c to your computer and use it in GitHub Desktop.
Save tahaozket/ba24e33e4183257024ee7019c0e87f4c to your computer and use it in GitHub Desktop.
#!/bin/bash
for file in *.feat;do
echo ${file##*/}
filename=${file##*/}
lastline="$(awk '/./{line=$0} END{print line}' $filename/filtered_func_data.ica/labels.txt)"
echo ${lastline}
length=${#lastline}
parsed=${lastline:1:length-2}
echo fsl_regfilt -i $filename/filtered_func_data -o $filename/filtered_func_data_clean -d $filename/filtered_func_data.ica/melodic_mix -f "\"$parsed"\"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment