I have a file with the following content:
$ cat /tmp/sveta
1 lock/lock0lock.c line 5163
1 lock/lock0lock.c line 3249
1 fsp/fsp0fsp.c line 3395
1 btr/btr0cur.c line 672
1 btr/btr0cur.c line 450
1 ./include/btr0btr.ic line 53
If I run gnusort on my file, I get the following results (expected):
$ gnusort -r /tmp/sveta
1 lock/lock0lock.c line 5163
1 lock/lock0lock.c line 3249
1 ./include/btr0btr.ic line 53
1 fsp/fsp0fsp.c line 3395
1 btr/btr0cur.c line 672
1 btr/btr0cur.c line 450
With sort -nr I get a different order (pay attention for the last line):
$ sort -nr /tmp/sveta
1 lock/lock0lock.c line 5163
1 lock/lock0lock.c line 3249
1 fsp/fsp0fsp.c line 3395
1 btr/btr0cur.c line 672
1 btr/btr0cur.c line 450
1 ./include/btr0btr.ic line 53
However, if I use pipe sort -n | sort -r, the results are the same as with gnusort:
$ sort -n /tmp/sveta | sort -r
1 lock/lock0lock.c line 5163
1 lock/lock0lock.c line 3249
1 ./include/btr0btr.ic line 53
1 fsp/fsp0fsp.c line 3395
1 btr/btr0cur.c line 672
1 btr/btr0cur.c line 450
I have a file with the following content:
If I run
gnusorton my file, I get the following results (expected):With
sort -nrI get a different order (pay attention for the last line):However, if I use pipe
sort -n | sort -r, the results are the same as with gnusort: