关于bash:在sed命令中转义正斜杠

  1. 如果replace内容不包含/这种写法没问题sed"s/regex/replace/" file
  2. 如果replace内容包含/,则改变分割符号为|,完整写法为 sed"s|regex|replace|" file ,这样就不用为\写转义了

标签: none