领导给安排了一个任务,用shell编写,求大侠指导,在线等
name: CLcounter
parameters: -d dir [-R [level]]
/*-d: parameter, refer to the name of dest directory;
-R: optianl parameter, refer to 'recursive'; 'level' is an optional parameter of '-R', it refers to the recursive level in the dest directory;
default leave is 1 if there is no -R in command line,
if there is no level following -R in command line, the program will program will stop after leaf sub-directories are counted*/
target:
0. display brief help when wrong command line
1. count the number of lines of all .c files under the dir (and the sub-dir) exclude the comment lines
2. count the number of lines of all .h files under the dir (and the sub-dir) exclude the comment lines
3. count the number of lines of all scripts (shell/perl/python currently) under the dir (and the sub-dir) exclude the comment lines
4. count the number of .c files / .h files / scripts respectively.
5. output the results on stdout in some human-readable format.
名称:CLcounter
参数:- d dir[- r[水平]]
/ * - d:参数,查阅该名称的桌子目录;
r:optianl参数,请参考“递归”;“水平”是一个可选参数的“r”,它指的是递归级别在dest目录;
默认的离开是1如果没有- r命令行,
如果没有水平- r命令行后,程序将程序将阻止叶片后算* /子目录
目标:
0。显示命令行简要帮助有错的时候
1。计数的行数的。c文件目录下(和sub-dir)排除在外的注释行
2。计数的行数的。h文件目录下(和sub-dir)排除在外的注释行
3。计数的行数的所有脚本(壳牌/ perl / python目前)以下的目录(和sub-dir)排除在外的注释行
4。的数目。c文件/。分别h文件/脚本。
5。输出结果stdout上在一些人类可读格式。
这是需求,下面的中文是我用有道翻译的,请大侠指导下,还不明白什么意思