摘要: 001、? 匹配0次或1次 [b20223040323@admin1 test11]$ ls a.txt [b20223040323@admin1 test11]$ cat a.txt 01 02abc 03 04 05 06ac 07 08 09 10xyz 11 12 13 14mnp 15 1 阅读全文
posted @ 2026-01-02 09:26 小鲨鱼2018 阅读(5) 评论(0) 推荐(0)
摘要: 001、方法1 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt aaa bbb cc ddd ee [root@PC1 test]# cat -A a.txt aaa^M$ bbb^M$ cc^M$ ddd^M$ ee^M$ [root@PC 阅读全文
posted @ 2026-01-02 00:37 小鲨鱼2018 阅读(8) 评论(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 11 12 13 14 15 16 17 18 19 20 [root@PC1 test]# sed 's/.*/a & b 阅读全文
posted @ 2026-01-02 00:25 小鲨鱼2018 阅读(3) 评论(0) 推荐(0)
摘要: 001、 小写转换为大写 [root@PC1 test]# ls [root@PC1 test]# echo {a..g} a b c d e f g [root@PC1 test]# echo {a..g} | sed 's/[a-z]/\U&/g' ## \U表示将后边的字母转换为大写(U:up 阅读全文
posted @ 2026-01-02 00:14 小鲨鱼2018 阅读(3) 评论(0) 推荐(0)