This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 如何用unix sort 对一个文件(field 0, 2,3) 排序,delimeter is |,谢谢
文件内容见内如何用unix sort 对一个文件(field 0, 2,3) 排序,delimeter is |,谢谢
223|abc|20|2003-12-31 13:20:59.123
233|abc|10|2003-12-31 13:20:58.123
243|abc|50|2002-12-30 13:20:59.999
-usis(人群中的卑微者,求知);
2005-1-6
{175}
(#2060858@0)
-
try sort +1 -2 +3 -4 +4 -5 infile
-poppy(千奇);
2005-1-6
(#2060883@0)
-
sort -k1n -k3n -k4n -t| (on OSF-1) may be different on other flavours.
-whom(别拿俺们村长不当干部);
2005-1-6
(#2060913@0)
-
why don't use awk?awk -F| '{print $1 $3 $4}' filename
-redspider(红蜘蛛);
2005-1-7
{37}
(#2061311@0)
-
谢谢各位unix大师
-usis(人群中的卑微者,求知);
2005-1-8
(#2063077@0)