Hi there,
Perhaps the error is due to mentioning -eddy_options=
This is a small difference in syntax between FSL and MrTrix, only FSL uses the equal to sign after the option (for some commands). So I guess removing the equal to sign after eddy_options should fix it. Also leave a space after your opening inverted comma (I use single rather than double) with the eddy commands.
example script:
dwipreproc rpe_none pe_dir PA eddy_options ’ --slm=linear --repol’ IN OUT
Hope this helps!