随笔分类 -  脚本三剑客之Shell

摘要:so in order to reg () in tcl; we needs to use regexp -- {\(\)} $express or use: regsub -- "\\(\\)" $express https://stackoverflow.com/questions/142373 阅读全文
posted @ 2021-08-10 14:08 John_K 阅读(119) 评论(0) 推荐(0)
摘要:(use the exp to match the string, it it matches, put it to sting), if it matches, it returns 1, if not matches, it returns 0. options: -indices: retur 阅读全文
posted @ 2020-11-14 14:05 John_K 阅读(176) 评论(0) 推荐(0)
摘要:(matches one "e" or multiple "e") (matches one "e" and matches ea if there are any, so a is optional) (matches 'a' 0 or more, so it matches e, ea, eaa 阅读全文
posted @ 2020-11-13 14:53 John_K 阅读(82) 评论(0) 推荐(0)
摘要:BRE (基本)正则: . 匹配任何单个字符 + 匹配前面一个或者多个 ? 匹配前面零个或者一个 * 匹配前面任何(或者没有的)单个字符 ab*c 表达匹配ac, abc, abbc, abbbbc ^ 匹配行或者字符串开始处 // ^abc : abc出现在一行的开头 $ 匹配字符串完结处 // 阅读全文
posted @ 2020-05-13 14:51 John_K 阅读(203) 评论(0) 推荐(0)
摘要:Day1: 基本I/O : printf "aaa\n" echo "aaa" // 带自动换行 管道:(读取txt 的内容, 处理, 输出到sort, 再输出到txt文件) tr [options ] source_char_list replace_char_lst 功能: 转换或者删除字符 - 阅读全文
posted @ 2020-05-12 13:11 John_K 阅读(107) 评论(0) 推荐(0)