syntax error near "^M"

I am creating config files in windows (using Wordpad or Notepad and saving as "file.extension") and ftp'ing them to my linux machine.  Sometimes when I restart my servers, I get the error in my /var/log/messages file as something like "syntax error near "^M" "(or something to that effect).  When I open the file in Linux, there is no "^M" in the file anywhere and I want to pull my hair out.  Is this a common error and is there really a "^M" there that I can't see?  I thought I was doing something wrong until I was reading some other questions posted and saw a similar problem someone was having.  Where does this hidden "^M" come from? I have a feeling that if I "pico file.extension" and re-save it in Linux it will work because I think I have unknowingly solved the problem before, I just haven't tried it this time yet.  Whatcha think?  Thanks in advance!
LVL 1
GorGor1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

steve265Commented:
^M is usually used to signify a return at the end of a line.
I would go to the file in question, go to the end of the last line of text and hold down the delete key for a few seconds. This will get rid of any ambiguous return characters.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.