linux下获取某文件的总行数

需求:

linux下获取某文件的总行数

实现:

方案一:

echo `cat logfile.txt | wc -l`

方案二:

more logfile.txt |wc -l

摘自:http://www.xhuojia.com/zhuanlan/2779749052.html

猜你喜欢

转载自blog.csdn.net/smallnetvisitor/article/details/82186908