文件名称:LINUX_Shell编程基础教程
- 所属分类:
- Linux/Unix编程
- 资源属性:
- 上传时间:
- 2017-12-08
- 文件大小:
- 27kb
- 下载次数:
- 0次
- 提 供 者:
- 脑袋***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
1)在Linux编辑中命令区分大小写字符。
2)在Shell语句中加入必要的注释,以便以后查询和维护,注释以#开头。
3)对Shell变量进行数字运算时,使用乘法符号“*”时,要用转义字符“\”进行转义。
4)由于Shell对命令中多余的空格不进行任何处理,因此程序员可以利用这一特性调整程序缩进,达到增强程序可读性效果。
5)在对函数命名时最好能使用有含义且能容易理解的名字,即使函数名能够比较准确地表达函数所完成的任务。同时建议对于较大的程序要建立函数名和变量命名对照表。(1) the command is ordered to distinguish case and case character in the Linux editor.
2) add the necessary comments in the Shell statement, so as to facilitate the inquiry and maintenance, comments to # beginning.
3) when the Shell variable is numeric, use the multiplicative symbol "*" to use the escape character "\" to escape.
4) because Shell does not handle any redundant spaces in commands, programmers can use this feature to adjust program indentation to enhance program readability.
5) in the name of a function, it is best to use a name that is meaningful and easy to understand, even if the function name can express the tasks completed by the function more accurately. It is also suggested that a function name and a variable name control table should be established for a larger program.)
2)在Shell语句中加入必要的注释,以便以后查询和维护,注释以#开头。
3)对Shell变量进行数字运算时,使用乘法符号“*”时,要用转义字符“\”进行转义。
4)由于Shell对命令中多余的空格不进行任何处理,因此程序员可以利用这一特性调整程序缩进,达到增强程序可读性效果。
5)在对函数命名时最好能使用有含义且能容易理解的名字,即使函数名能够比较准确地表达函数所完成的任务。同时建议对于较大的程序要建立函数名和变量命名对照表。(1) the command is ordered to distinguish case and case character in the Linux editor.
2) add the necessary comments in the Shell statement, so as to facilitate the inquiry and maintenance, comments to # beginning.
3) when the Shell variable is numeric, use the multiplicative symbol "*" to use the escape character "\" to escape.
4) because Shell does not handle any redundant spaces in commands, programmers can use this feature to adjust program indentation to enhance program readability.
5) in the name of a function, it is best to use a name that is meaningful and easy to understand, even if the function name can express the tasks completed by the function more accurately. It is also suggested that a function name and a variable name control table should be established for a larger program.)
(系统自动生成,下载前可以参看下载内容)