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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -