Linux example of sort

sort file

: sorting file using first column

sort -k 2 file

: sorting file using second column

sort -r -k 2 file

: sorting file using second column in reversal order

sort file > file.txt

: sorting file and save to file.txt



Thanks,

JF

댓글