In vi, do a :%s/^M//g
To get the ^M hold the control key, press V then M (Both while holding the control key) and the ^M will appear.
or dos2unix
How to delete ^M character using vi
In vi, do a :%s/^M//g
To get the ^M hold the control key, press V then M (Both while holding the control key) and the ^M will appear.
or dos2unix