gpt4 book ai didi

json - 用 sed 替换 JSON 中的 bool 字段

转载 作者:行者123 更新时间:2023-12-02 00:47:26 39 4
gpt4 key购买 nike

我正在尝试使用 sed 替换 JSON 字符串中的 bool 值。

STRING:"should-replace":false

我如何使用 sedfalse 替换为 true

最佳答案

试试这个 -

sed '/should-replace/s/false/true/' f

关于json - 用 sed 替换 JSON 中的 bool 字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42720132/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com