Sometimes if you modify or create a file in Windows or DOS and then copy it to a Linux (well Unix like) file system you get ^M characters at the end of each line. These are annoying when trying to run scripts on files (or things like latex) and can be nicely removed using the vi editor. Open you file with vi and then do:
ESC:%s/^M//g
You can get the ^M by pressing Ctrl V and then Ctrl M.







