10
1
On Solaris, if you open a file in vi that has Windows line endings, this shows up as ^M at the end of every line.
On Linux, vi is cleverer and understands the Windows file format, and does not display ^M.
Is there a setting to make Linux vi behave the same as Solaris in this respect?
A common problem for us is copying a shell script off a (Windows) dev box and forgetting to dos2unix it, and then being confused when it doesn't work properly. On Solaris the problem is obvious as soon as you vi the file, but not on Linux.
Thanks.
On my
vim
, by default I usually see no^M
, but sometimes there is one at the end of the file. – trysis – 2017-03-23T19:06:37.577On Linux, vi is usually Bram Moolenaar's vim, I expect the vi on Solaris is the Bill Joy vi, original, authentic but less capable.
– RedGrittyBrick – 2011-11-16T10:04:17.040