How do I sort lines in Linux?

Đức Linh

New member
How do I sort lines in Linux?
Answer
Sort lines of a text file
  1. To sort the file in alphabetical order, we can use the sort command without any options:
  2. To sort in reverse, we can use the -r option:
  3. We can also sort on the column. For example, we will create a file with the following text:
  4. Blank space is the default field separator.
 

Tìm kiếm

Back
Top