摘要: 1,函数的格式: 函数的调用直接在脚本里输入函数名 2,利用函数来比较两个数字的大小 阅读全文
posted @ 2017-10-18 15:52 开始认识 阅读(201) 评论(0) 推荐(0) 编辑
摘要: shell中的数字 author :headsen chen date :2017-10-18 15:01:42 个人原创,转载请注明作者,出处,否则依法追究法律责任 1,生成随机数(范围:0-32767),用特殊变量:RANDOM 2,整数运算expr的用法 2,整数测试 3,整数运算中的let用 阅读全文
posted @ 2017-10-18 15:29 开始认识 阅读(4086) 评论(0) 推荐(0) 编辑
摘要: shell中的ps3为何物: author :headsen chen 2017-10-18 13:59:57 PS3作为select语句的shell界面提示符,提示符为PS3的值(赋予的字符串),更换默认的提示符”#?” 实例: 注意:ls -F 加的是单引号。 总结:PS3是一个和select循 阅读全文
posted @ 2017-10-18 14:54 开始认识 阅读(2331) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-10-18 13:57 开始认识 阅读(368) 评论(0) 推荐(0) 编辑
摘要: shell脚本之for循环 author :headsen chen 2017-10-18 09:50:41 个人原创,转载请注明。否则依法追究法律责任 1,cat forloop.sh 2.cat forloop2.sh 【默认以空格和换行符作为分隔】 3,cat forloop3.sh 4,ca 阅读全文
posted @ 2017-10-18 13:56 开始认识 阅读(7917) 评论(0) 推荐(0) 编辑
摘要: shell常用脚本 author:headsen chen 2017-10-17 15:36:17 个人原创,转载请注明,否则依法追究法律责任 1,vim name.grep.sh 2,cat tellme.sh 3,cat idcheck.sh 4,cat case.sh 注意:脚本里调用文件名: 阅读全文
posted @ 2017-10-17 17:00 开始认识 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 常见的if语句shell脚本 author :headsen chen 2017-10-17 15:00:07 1,cat if.sh 2, cat if2.sh 阅读全文
posted @ 2017-10-17 15:25 开始认识 阅读(311) 评论(0) 推荐(0) 编辑
摘要: shell脚本中文件测试 author:headsen chen 2017-10-17 14:35:19 个人原创,转载请注明作者,否则 依法追究法律责任 [ -f filename ] ,文件filename存在且为普通文件时,返回真(0) [ -d filename ] ,文件存在且为目录,返回 阅读全文
posted @ 2017-10-17 14:59 开始认识 阅读(419) 评论(0) 推荐(0) 编辑
摘要: shell脚本中的整数测试 author:headsen chen 2017-10-17 13:58:12 个人原创,转载请注明作者,出处,否则依法追究法律责任 1,test用法:test 表达式(注意:只能用 gt,lt,le,ge,le,单括号中也是这种用法,不能用大小符号) [root@lin 阅读全文
posted @ 2017-10-17 14:35 开始认识 阅读(969) 评论(0) 推荐(0) 编辑
摘要: Ubuntu常用命令: 本文转载来自:http://www.weixuehao.com/archives/25 原文:http://www.cnblogs.com/laov/p/3541414.html 常用指令 ls 显示文件或目录 -l 列出文件详细信息l(list) -a 列出当前目录下所有文 阅读全文
posted @ 2017-10-16 18:06 开始认识 阅读(2346) 评论(0) 推荐(0) 编辑