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

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 :-))

Replies are listed 'Best First'.
Re^4: Convert file to unix
by james2vegas (Chaplain) on Aug 19, 2009 at 10:47 UTC
    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 :-))
        This is quite the waste of time and space, but still if you insist, this comment made the assertion (that simply resaving 'dos-mode' files in vi would fix them), and when I referred to the parent in my reply to you that is the comment I was referring to, i.e. the parent of the comment you were replying to, not the parent of your reply.

        Also thanks for the information on removing ^Ms with vi, but my reply to Re: Convert file to unix was intended to clarify the comment re: fixing 'dos mode' text files, not to solicit a solution to the problem in vi.