#!/bin/bash
echo "★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★"
echo "★☆ 统计代码行数 ☆★"
echo "★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★"
echo "请输入您要测试的文件目录或文件"
echo "您输入的目录或文件为:$1"
echo `date` >> /home/linux/line_代码行数统计.txt
echo "$1目录或文件" >> /home/linux/line_代码行数统计.txt
echo "正在测试中请稍候....."
echo "总共`sudo find $1 -name "*.c" |xargs cat|grep -v ^$|wc -l`行" >>/home/linux/line_代码行数统计.txt
cat /home/linux/line_代码行数统计.txt