1. load file into vi 2. in command mode: %s/^V^M//g (^V is literal mode, then add carriage return, or ^M) 3. save file.