Convert CRLF to LF for file in **/*.brs do vi +':w ++ff=unix' +':q' "$file" done Remove BOM :set nobomb :w