【发布时间】:2011-08-13 07:27:38
【问题描述】:
我已经关注了 bash 脚本。它只计算 *.cpp 中的行数。如果没有 pugixml.cpp,我如何计算 *.h 文件中的行数?
find . -type f -name \*.cpp -and ! -name \pugixml.cpp -exec cat '{}' + | wc -l
【问题讨论】:
-
你能澄清一下吗?您是指所有 .h 文件,还是每个现有 .cpp 文件对应的 .h 文件?