我在一个txt文件上运行Linux排序,并得到以下输出:
root@nxxx:~# cat b.txt
(52819531,3245)
(528,216)
(52819532,32680)
(52821791,3072)
(52821795,30713)
root@nxxx:~# sort -k1 -t, b.txt
(52819531,3245)
(52819532,32680)
(528,216)
(52821791,3072)
(52821795,30713)
我想应该是这样的:
(528,216)
(52819531,3245)
(52819532,32680)
(52821791,3072)
(52821795,30713)
有什么解释吗?
答案 0 :(得分:1)
尝试添加-V自然排序...
(528,216)
(52819531,3245)
(52819532,32680)
(52821791,3072)
(52821795,30713)