sort 命令能实现按数字顺序排序?

sort 命令能实现按数字顺序排序?

sort 命令能实现按数字顺序排序?
文件如下test.txt:
2 zang  sadgsd
12 sdrwetre etet
56 wetqet wertwe
9 werwet ete
5 wetet were

直接sort test.txt是这样的结果:
12 sdrwetre ete
2 zang  sadgsd
5 wetet were
56 wetqet wertwe
9 werwet ete
如何让他排完之后是这样的:
2 zang  sadgsd
5 wetet were
9 werwet ete
12 sdrwetre ete
56 wetqet wertwe
sort -n
perldoc -f sort

Examples 第5个:

# sort numerically ascending
@articles = sort {$a <=> $b} @files;