How to change Windows/DOS line breaks to Unix style with Vi

I had a file that was edited in Windows, so it had CRLF line breaks. It was a script and I had to change the line breaks to LF before I could run the script in bash. I converted the line breaks to Unix style using the vi editor and…