...
One question, what does the ^M do at the end of the cgminer configs command? I dont see that in the list of configs for cgminer.
The ^M is an artifact from Windows, not to be worried about. Windows uses Carrage-Return+Linefeed as the end of line codes in its text files. *NIX systems only use Carrage-Return. The artifact doesn't affect running the script.