Hi @jdtournier and @maxpietsch,
Thanks so much for your replies! Apologies for the delayed response, I sent this at the awkward period before the long weekend break here in Aus and did not have the chance to reply until I got back to work
I did a quick google search and found that there is a method of quickly switching the scripting environment from zsh back to bash:
chsh -s /bin/bash
The original website can be viewed here: How to Change the Default Shell to Bash on macOS Catalina
Once the environment has been switched back to bash, the ‘foreach’ command works as per normal. I have previously been successful with using the
foreach command with a space between
foreach subjects * mrdegibbs IN/dwi_denoised.mif IN.dwi_denoised_unringed.mif -axes 0,1
I have been running the
'foreach' command previously on bash with a space in between subjects and * and it seems to be executing fine.
While switching the scripting environment works in the interim, I will also create an alias as per @maxpietsch’s advice (
alias foreach=$(dirname $(which mrinfo))/foreach ) so that I can access the command natively in zsh as well.
Many thanks for your help here!