小编Jos*_*osé的帖子

sed 4.4 支持哪些分隔符

我期望这两个 sed 命令是等效的,但mozilla/DST_Root_CA_X3.crt仅在第二种情况下被删除,为什么?

如果重要的话,我正在使用 sed 4.4 和 Debian Stretch

(stretch-arm64)ubuntu@ip-10-1-2-224:~$ sudo sed '#^mozilla/DST_Root_CA_X3.crt$#d' test-certificates.conf
mozilla/Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.crt
mozilla/XRamp_Global_CA_Root.crt
mozilla/certSIGN_ROOT_CA.crt
mozilla/ePKI_Root_Certification_Authority.crt
mozilla/emSign_ECC_Root_CA_-_C3.crt
mozilla/emSign_ECC_Root_CA_-_G3.crt
mozilla/emSign_Root_CA_-_C1.crt
mozilla/emSign_Root_CA_-_G1.crt
mozilla/DST_Root_CA_X3.crt

(stretch-arm64)ubuntu@ip-10-1-2-224:~$ sudo sed '/^mozilla\/DST_Root_CA_X3.crt$/d' test-certificates.conf
mozilla/Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.crt
mozilla/XRamp_Global_CA_Root.crt
mozilla/certSIGN_ROOT_CA.crt
mozilla/ePKI_Root_Certification_Authority.crt
mozilla/emSign_ECC_Root_CA_-_C3.crt
mozilla/emSign_ECC_Root_CA_-_G3.crt
mozilla/emSign_Root_CA_-_C1.crt
mozilla/emSign_Root_CA_-_G1.crt
Run Code Online (Sandbox Code Playgroud)

sed

1
推荐指数
1
解决办法
226
查看次数

标签 统计

sed ×1