Dado o arquivo
354058:c1.com/client-01.log:13:30:04 INFO: Item: created widget in ARRIVALS
360746:c1.com/client-01.log:13:39:46 INFO: change transfer to contact
379144:c3.com/client-01.log:13:30:02 INFO: Item: created widget in ARR
392162:c3.com/client-01.log:13:51:59 INFO: Item: created widget in ARR
353619:d1.com/core-01.log:14:09:45 INFO: Server: updating
367422:c5.com/client-01.log:13:51:56 INFO: searching for Sign
367446:c5.com/client-01.log:13:51:59 INFO: Item: created widget in ARRIVALS
367629:c5.com/client-01.log:13:52:12 INFO: change from initial to contact
371979:c9.com/client-01.log:14:00:19 INFO: change workflow to tgl
o comando
sort -t: -k3 file
executaria uma ordenação lexicográfica usando o terceiro campo :
-delimited (e qualquer coisa depois dele) como a chave de classificação. O resultado seria
379144:c3.com/client-01.log:13:30:02 INFO: Item: created widget in ARR
354058:c1.com/client-01.log:13:30:04 INFO: Item: created widget in ARRIVALS
360746:c1.com/client-01.log:13:39:46 INFO: change transfer to contact
367422:c5.com/client-01.log:13:51:56 INFO: searching for Sign
392162:c3.com/client-01.log:13:51:59 INFO: Item: created widget in ARR
367446:c5.com/client-01.log:13:51:59 INFO: Item: created widget in ARRIVALS
367629:c5.com/client-01.log:13:52:12 INFO: change from initial to contact
371979:c9.com/client-01.log:14:00:19 INFO: change workflow to tgl
353619:d1.com/core-01.log:14:09:45 INFO: Server: updating
Para que isso funcione, supõe-se que os números nos campos 3, 4 e 5 sejam sempre preenchidos com zeros.