摘要: 001、单行注释 // 002、多行注释 /* ......*/ 阅读全文
posted @ 2024-07-09 13:21 小鲨鱼2018 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 001、 -P选项表示 perl正则兼容 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 01 02 03 04 05 中国农副业 06 07 河南 08 09 10 [root@PC1 test]# cat a.txt | 阅读全文
posted @ 2024-07-09 13:06 小鲨鱼2018 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 01 02 03 04 05 中国农副业 06 07 河南 08 09 10 [root@PC1 test]# cat a.txt | grep -P '[\x{4e0 阅读全文
posted @ 2024-07-09 13:05 小鲨鱼2018 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 001、grep命令报错如下 [root@PC1 test]# echo "你好世界" | grep -P '[\u4e00-\u9fff]+' grep: PCRE does not support \L, \l, \N{name}, \U, or \u 002、解决方法(把U改为x;同时中间用中 阅读全文
posted @ 2024-07-09 13:00 小鲨鱼2018 阅读(0) 评论(0) 推荐(0) 编辑