Hi hchong005, I did not notice the ^M: message you have already got one post before, sorry. I think your workflow to prepare and call the mt_prep_gamma_snap script is just fine…but:
^M occurs whenever you have some “bad” line endings in your script, mostly an extra space or something…well, that is really nasty to recognize on screenshots ;). I recommend to double-check the scripts you edited (mt_prep_gamma_snap and so on) and delete all needless spaces in each line in the end. When I encountered this problem the first time, I found this thread helpful
The fact, that you got the ^M message and the Andy Hooper, December 2012 is a hint, that the mt_prep_gamma_snap script was called successfully, but in the script exists a line you might have changed and somehow got a bad ending, maybe added a comment etc. I remember you said you have tried to change WORKDIR in mt_prep_gamma_snap, my best guess is, you have not restored the script exactly…In your place, I would delete the script mt_prep_gamma_snap, download the changed one by FeiLiu, rename it and paste it to the …/bin folder once again. Do not forget the execution flag!
After that try again to run this script.
Good Luck, and I hope, I am right with my assumption