I have a stranger thing:
I edit a file with an editor in Windows and it looks fine. But after I transport/copy this file to LINUX and as I open this file with vi, I find some unexpected characters.
For examle this file has the line in Windows
Code:
...
export http_proxy=http://$HTTP_PROXYHOST:$HTTP_PROXYPORT/
...
But under LINUX vi it looks as follow:
Code:
...
export http_proxy=http://$HTTP_PROXYHOST:$HTTP_PROXYPORT/^M
...
One can see the charater ^M now (this should the carrage return?). This can even not be seen with less or cat.
I am not sure if this is the problem of LINUX or a mistake as I edit this file under Windows? If this is the problem of LINUX, why the other lines without such ending?
I wonder how can I find out this under Windows before I transfer/copy this file to LINUX?
I've tried using the HEX-Editor but this doesn't help.
P.S.: After I run dos2unix over this file, the unwanted charaters are gone.