Checking for ^M DOS line endings using vim

vi  -c ":e ++ff=unix" -c "set list" file.txt