Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
    
@Gilles answer here may help. – pnuts Dec 3 '12 at 13:50
up vote 3 down vote accepted

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).

share|improve this answer
    
Thanks for the tip!!! – eastafri Dec 3 '12 at 14:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .