上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: 1. 标准ASCII编码 1.1 编码规范 由美国国家标准局(ANSI)制定(American Standard Code for Information Interchange,称为ISO 646标准。 采用7位码进行编码,表示128个字符。 最高位(b7)用作奇偶校验位。 2. ANSI编码 中 阅读全文
posted @ 2017-07-20 19:20 Desneo 阅读(537) 评论(0) 推荐(0) 编辑
摘要: 1. 改进点/基础 //安全判空 val length = text?.length; //类型转换 if (object is Car) { var car = object as Ca } //操作符变化 & and | or ^ xor shr , off: Int = 0, len: Int 阅读全文
posted @ 2017-07-20 18:26 Desneo 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 1. 容器 可变/不可变 List 只读list; MutableList; Set/MutableSet Map/MutableMap //示例 val numbers: MutableList = mutableListOf(1, 2, 3) val readOnlyView: List = n 阅读全文
posted @ 2017-07-20 18:24 Desneo 阅读(1181) 评论(0) 推荐(0) 编辑
摘要: find ./ name "test.txt" 示例 find . ( name " .txt" o name " .pdf" ) print //查找txt和pdf文件 find . regex ". (.txt|.pdf)$" //按正则查找 find . ! name " .txt" prin 阅读全文
posted @ 2017-07-20 17:28 Desneo 阅读(542) 评论(0) 推荐(0) 编辑
摘要: grep r bes.dsf.server.zookeeper ./ //递归搜索,不支持指定文件类型 find ./ name " .entity.xml" exec grep r paymentMode {} \; //指定类型文件中搜索,必须\;结尾 grep a 'querySubscrib 阅读全文
posted @ 2017-07-20 17:27 Desneo 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 1. 格式 格式: awk 'pattern {action} pattern {action}' filename 注:多个文件时,读取从左到右,读完第一个再读取第二个 pattern 1 /正则表达式/:使用通配符的扩展集。 2 关系表达式: 可以是字符串或数字的比较,如$2 $1选择第二个字段 阅读全文
posted @ 2017-07-20 17:26 Desneo 阅读(992) 评论(0) 推荐(0) 编辑
摘要: sed option 'action' filename (文件可多个) option: i 直接在原文件中修改! n 安静模式,默认情况所有数据都会被列出,但 n只有经过动作处理的那一行才被列出(结合p使用) 2. 选项 action 动作:'[n1[,n2]]function' 表示对n1、n2 阅读全文
posted @ 2017-07-20 17:26 Desneo 阅读(2793) 评论(0) 推荐(0) 编辑
摘要: 1. 文件操作 1.1 获取文件头/文件尾 head 100 catanila.out temp.log tail f oc.logs tail 100 oc.log 1.2 合并文件 cat .txt test.txt 1.3 清空文件 echo "" oc.log 1.4 创建文件 touch 阅读全文
posted @ 2017-07-20 17:22 Desneo 阅读(722) 评论(0) 推荐(0) 编辑
摘要: 1. 基础 2. 变量 (不要空格) 2.2 获取、设置环境变量 2.3 Shell特殊变量 3. 数组和循环 声明: array=(element1 element2 element3 .... elementN) //()括起来 空格分开 读取: echo ${array[0]} 遍历: ${a 阅读全文
posted @ 2017-07-20 17:17 Desneo 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 特殊字符 (转义字符)若要匹配这些特殊字符之一,在字符前面加反斜杠字符 (\)。 例如,若要搜索“+”文本字符,可使用表达式“\+”。 |元字符|行为|示例 | |: |: | | |零次或多次匹配前面的字符或子表达式。 等效于 {0,}。|zo 与“z”和“zoo”匹配。| |+|一次或多次匹配前 阅读全文
posted @ 2017-07-20 17:15 Desneo 阅读(2303) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页