in reply to Re: Convert file to unix
in thread Convert file to unix

What version of nvi/vim is this? A co-admin on a server insints on ftping config files back and forth between the server and his windows box where he edits the files in notepad. So all the config files have the ^M disease and opening and saving in nvi or vim does not remove the ^Ms.

Replies are listed 'Best First'.
Re^3: Convert file to unix
by Bloodnok (Vicar) on Aug 19, 2009 at 10:31 UTC
    In whatever flavour of vi you choose, type the following at the command (':') prompt i.e. non-visual:
    s,^M,,g w!
    NB The '^M' (<Ctrl> <M>) char is obtained by typing <Ctrl><V><Ctrl><M>...

    A user level that continues to overstate my experience :-))
      The parent claimed that simply resaving should remove the ^Ms
        The post to which I replied i.e. the parent of my reply (aka your post), didn't - in fact, it was claiming the opposite - which you have kindly re-affirmed.

        My post identified a means to achieving the goal of ridding yourself of the infernal M$ line endings in such cases.

        A user level that continues to overstate my experience :-))