1
I have along list that created in /var/tmp/file.txt from some script (in Solaris machine) the following list have 4 fields
please advice how to sort the list according to the following TIMESTAMP ( by sort command or other solaris command as awk or sed ..... )
for example the date & time 15-10-2009 08:29:18 should be before 15-10-2009 08:29:10 ... etc
example of file.txt ( not sorted file )
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
1Well, the timestamp format in itself is annoying :-) . If it were the internationally recognized "YYYY-MM-DD HH:mm:ss", then a simple numeric (alpha, even) sort on those combined fields would be trivial. Still possible to fix, just annoying. – Daniel Andersson – 2012-04-17T08:00:05.227
s/internationally recognized/ISO 8601 / RFC 3339/ – Eroen – 2012-04-17T09:06:52.313