find . -name '*.py' -type f -exec cat {} \\;|sed '/^$/d;/^[ ]*$/d;/.*#$/d'|wc -l#该片段来自于http://www.codesnippet.cn/detail/100520133251.html
来源: http://www.codesnippet.cn/detail/100520133251.html