领导给安排了一个任务,用shell编写,求大侠指导,在线等

selina5288 2012-08-02 10:17:00
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上在一些人类可读格式。



这是需求,下面的中文是我用有道翻译的,请大侠指导下,还不明白什么意思
...全文
118 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
酱油党 2012-08-02
  • 打赏
  • 举报
回复
这年头好多老师跟领导的……
luciferisnotsatan 2012-08-02
  • 打赏
  • 举报
回复
lz的领导是老师吧?

69,373

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧