回复 1# hnldwhm52
尝试了一下用gawk( http://bcn.bathome.net/tool/4.1.0/gawk.exe )也能解决。
直接在命令行窗口执行:- gawk -F"[.:]" "{a[sprintf(\"%02X.%02X.%02X.%02X:%04X\n\",$1,$2,$3,$4,$5)]=$0}END{slen=asorti(a,tA);for(i=1;i<=slen;i++)print a[tA[i]]}" 1.txt>2.txt
复制代码 写进脚本然后执行:- gawk -F"[.:]" "{a[sprintf(\"%%02X.%%02X.%%02X.%%02X:%%04X\n\",$1,$2,$3,$4,$5)]=$0}END{slen=asorti(a,tA);for(i=1;i<=slen;i++)print a[tA[i]]}" 1.txt>2.txt
复制代码
|