k在dos环境下文件的格式与linux下的不一样,如下:
dos下的1.txt
367183DD5BFB955D63A15031600A73E9.DC3E12E1^M$
6398DB8899F133BEF0C6B219884BCE42.57720B4C^M$
CC97C1637EFAF9A0F369F8B08EBD8D47.1AD3F683^M$
DCE01EA20070AF266CEC982CC5BCCAD6.A9273779^M$
E03651872989ED7532C55403997E3FAD.9B16C00B^M$
0BB829716651D3E068E4705AF9F89069.9AEDFE90^M$
1B3A28947D02AD36F33CEA1C5A22ACCD.69CBBC42^M$
303B258D3F9ADDC906FC6929C832F742.5DECA0DD^M$
15E4C60DF9482C3C750108D698E96661.347E67D4^M$
C086D7454E6E291E71FE74219657DE37.7D599533^M$
1C16FAAAE33E5E8ED7F7C3DC9FC884C7.F06A33F7^M$
linux下的1.txt
367183DD5BFB955D63A15031600A73E9.DC3E12E1$
6398DB8899F133BEF0C6B219884BCE42.57720B4C$
CC97C1637EFAF9A0F369F8B08EBD8D47.1AD3F683$
DCE01EA20070AF266CEC982CC5BCCAD6.A9273779$
E03651872989ED7532C55403997E3FAD.9B16C00B$
0BB829716651D3E068E4705AF9F89069.9AEDFE90$
1B3A28947D02AD36F33CEA1C5A22ACCD.69CBBC42$
303B258D3F9ADDC906FC6929C832F742.5DECA0DD$
15E4C60DF9482C3C750108D698E96661.347E67D4$
C086D7454E6E291E71FE74219657DE37.7D599533$
1C16FAAAE33E5E8ED7F7C3DC9FC884C7.F06A33F7$
在转换格式上,sed -i 's/ //g' 1.txt , dos2unix 1.txt ,cat 1.txt | tr -d ' '效果都是一样的。