Sort

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the unix category.

Last Updated: 2024-04-25

How to sort by 2nd column

sort -k 2

This assumes white-space separates the columsn. You can set the delimiter with -t

`sort -k 2 -t "-"