I have a log file named a.log
! I want sort it by the fisrt field ! If two lines have the same field , the order will be original contens‘!
contents:
1. 101 c
2. 100 b
3. 100 a
4. 2 d
I expect the result:
1. 2 d
2. 100 b
3. 100 a
4. 101 c
So i use this command!
sort -nt 't' -k 1 a.log
But the result is :
1. 2 d
2. 100 a
3. 100 b
4. 101 c
Thanks very much!</p>