Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

Sort works on a per-line basis, not on fields within a line.

By default, it sorts based on the first character on the line and goes on from there. But you can also sort on "keys" other than at the beginning. This is useful when you want to sort on last name, or a numeric value at the end of the line, or so on. That's what the -t flag is for — it won't break up individual lines and sort within them.

If that's what you want to do, see Sort fields inlineSort fields inline

Sort works on a per-line basis, not on fields within a line.

By default, it sorts based on the first character on the line and goes on from there. But you can also sort on "keys" other than at the beginning. This is useful when you want to sort on last name, or a numeric value at the end of the line, or so on. That's what the -t flag is for — it won't break up individual lines and sort within them.

If that's what you want to do, see Sort fields inline

Sort works on a per-line basis, not on fields within a line.

By default, it sorts based on the first character on the line and goes on from there. But you can also sort on "keys" other than at the beginning. This is useful when you want to sort on last name, or a numeric value at the end of the line, or so on. That's what the -t flag is for — it won't break up individual lines and sort within them.

If that's what you want to do, see Sort fields inline

Source Link
mattdm
  • 41.3k
  • 18
  • 104
  • 140

Sort works on a per-line basis, not on fields within a line.

By default, it sorts based on the first character on the line and goes on from there. But you can also sort on "keys" other than at the beginning. This is useful when you want to sort on last name, or a numeric value at the end of the line, or so on. That's what the -t flag is for — it won't break up individual lines and sort within them.

If that's what you want to do, see Sort fields inline