[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sort:An unexpected result is displayed in the sort result.
From: |
Yang Yanchao |
Subject: |
sort:An unexpected result is displayed in the sort result. |
Date: |
Fri, 5 Nov 2021 17:31:42 +0800 |
Dear Coreutils Maintainers,
When I sort the use cases using "sort":
[root@localhost test]# cat test
1.2.v1.6
1.0.v3.5
1.10.v2.4
[root@localhost test]# sort -n -t'.' -k3,3 -k4,4 test
1.10.v2.4
1.0.v3.5
1.2.v1.6
The order I expected should be like this.
1.2.v1.6
1.10.v2.4
1.0.v3.5
It looks like the third column is alphabetic, and I added the -n option, which
was ignored, but I used -k to specify the third column as the first
priority.This means that -k has a lower priority than -n? Does this fit the
intended design?
Thanks,
Yang Yanchao
- sort:An unexpected result is displayed in the sort result.,
Yang Yanchao <=