Solaris通过sorting命令根据date和时间sorting文件
我有一些从脚本(在Solaris机器)/ var / tmp / file.txt中创build的列表,下面的列表有4个字段 请告知如何根据以下TIMESTAMP对列表进行sorting(通过sorting命令或其他solaris命令) 例如date和时间15-10-2009 08:29:18应该在15-10-2009 08:29:10之前…等等 file.txt的例子(不是sorting文件) PHONE_NUMBER TIMESTAMP ID TYPE ——————– ——————- —- ————– 972544111222 15-10-2009 08:29:18 20 sharp_gx10 33633333333 24-09-2009 16:17:45 20 other_mm_phone 841990000043 08-10-2009 09:04:38 60 other_mm_phone 972541230001 08-10-2009 14:23:48 20 other_mm_phone 。 。 。 。 我尝试sorting命令,但不清楚为什么file.txt不sorting sort -t' ' -k2.7,2.10n -k2.4,2.5n -k2.1,2.2n -k3 /var/tmp/file.txt 我们得到的结果是: 5938123456789141 12-10-2009 […]