wc -l file.txt
输出行数和文件名.
我只需要数字本身(不是文件名).
我可以做这个
wc -l file.txt | awk '{print $1}'
但也许有更好的方法?
shell wc
shell ×1
wc ×1