Maybe am missing something but how do i sort in a descending order a list with this naming
B7
B40
B41
B42
B8
B43
B20
B45
B53
B47
B48
B5
B6
sort -n
does not sort the way i would like
B5
B6
B7
and so on
Try this:
sort -k1.2n
This sorts by (the data starting at) the second char (2
) of the first column (1
), assuming numerical data (n
).