close

1. dos2unix                                                          # CRLF to LF, requiring installation of dos2unix

2. unix2dos                                                          # LF to CRLF, requiring installation of dos2unix

3. sed -e 's/$/\r/' inputfile > outputfile                   # UNIX to DOS  (adding CRs)

4. sed -e 's/\r$//' inputfile > outputfile                   # DOS  to UNIX (removing CRs)

5. perl -pe 's/\r\n|\n|\r/\r\n/g' inputfile > outputfile  # Convert to DOS

6. perl -pe 's/\r\n|\n|\r/\n/g'   inputfile > outputfile  # Convert to UNIX
7. perl -pe 's/\r\n|\n|\r/\r/g'   inputfile > outputfile  # Convert to old Mac

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Foxbrush 的頭像
    Foxbrush

    Foxbrush

    Foxbrush 發表在 痞客邦 留言(0) 人氣()