Windows uses two bytes for end-of-line markers, namely CR and LF, while Linux and Unix only use one: LF
dos2unix filename
sed -i 's/\r$//' file
perl -pi 's/\r$//' file
Source: Shell trick: CRLF to LF
Comment feed for this post