Sort input lines lexicographically or numerically.
Section: Viewing and Text Basics
Sort lines
bash
bash
sort -t, -k2,2n scores.csvExplanation
Combine with `uniq`, `comm`, or `join` for powerful text workflows.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Viewing and Text Basics