Languages
[Edit]
EN

Bash - how to sort lines?

7 points
Created by:
Nataniel-Barclay
499

Sort operation can be achieved with sort command.

1. Sorting by rows:

2. Reversed sorting by rows:

3. Number sorting:

4. Sorted by first column (pipe used):

Note: delimiter set as colon.

5. Sorted by third and fourth columns (pipe used):

Note: default delimiters are space and tab.

6. Linux user list sorted by id:

Note: delimiter set as colon; selected columns are 1st and 3rd; sorting by id.

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Bash

Bash - sort lines
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join