shell - How to sort alphabet first and then numeric in unix -


suppose have file containing 1 column:

1 2 b 0 

the expected outcome:

a b 0 1 2 

if use sort alone, outcome become 1->2->a->b not want. there way can sort alphabet first , numeric? thanks.

sort -g <inputfile b 0 1 2 

additional example:

cat inputfile 1 0 2 3 sd 35 76 23 asd   sort -g inputfile asd sd 0 1 2 3 23 35 76 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -