【发布时间】:2021-03-25 00:17:39
【问题描述】:
我的 swagger.json 文件中有一行可以用 grep host swagger.json 输出:
"host": "there.can.be.nothing.or.anything.here",
所以我想替换第二个引号 there.can.be.nothing.or.anything.here 中的字符串,我只是把那个值作为一个例子,我可能会在这里放空引号,比如 "" 或某个域 "example.com" 重要的是我替换了其中的所有内容第二个引号。
如果我想用字符串 some.domain.com 替换它(可能使用 sed 命令?):
我会大摇大摆地编辑这一行:
"host": "some.domain.com",
【问题讨论】:
-
你试过this吗?