Hello,
I work in Ubuntu 16.04, I am new to Bash and something is wrong with my script, please help.
I have a few hundreds of subjects data (like subj003.nii.gz, subj012.nii.gz etc. up to subj567.nii.gz) in a directory /usr/afewmoredirectories/subjects.
I may run for each subject a command like
recon-all -subject subj003 -i subj003.nii.gz -all
which runs without error.
Instead I try to automatize the process. So I create two files:
In the list.txt I have a column of all the subject id (like subj003, subj012 etc. up to subj567)
In the doit.sh I have 2 lines:
name=$1
recon-all -subject ${name} -i ${name}.nii.gz -all
Then I execute in the root terminal
cat list.txt | xargs -I @ -P 3 ./doit.sh @
and something is wrong because instead of running the commands the output is:
.nii.gzcannot find subj012
Could you please explain me what I is wrong?