linux 中sed命令同时对多个字符进行替换
001、
[root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt d t d e k c z c e e f t [root@PC1 test]# sed 's/d/9/g' a.txt ## 将d替换为9 9 t 9 e k c z c e e f t [root@PC1 test]# sed 's/d\|e/9/g' a.txt ## 同时讲d和e替换为9 9 t 9 9 k c z c 9 9 f t


浙公网安备 33010602011771号