|
发表于 2008-1-20 15:59:34
|
显示全部楼层
[QUOTE=lxsbupt;1809219]问:
我把代码运行了一下,想统计当前目录下的*.c 和*.h文件,可是结果都是0
命令行输入count.sh ./正确吗?
当前目录下文件和运行结果如下:
[root@localhost zuoye]# ls
input.txt makefile rand.c statistic sub.cc tt
main.cc mkfile shellscript statistic_lines sub.h
[root@localhost zuoye]# ./statistic_lines ./*
Analyse ./input.txt ......
*.c total lines:0
*.h total lines:0
*.c numbers:0
*.h numbers:0 |
|