【发布时间】:2020-06-12 10:54:51
【问题描述】:
如何使用 jq 将 if 和 elif 的所有 json 输出合并为单个 json。
生成多个 json 的 Bash 脚本:
for i in "${arr1[@]}"
do
```commands```
if [ condition ]; then
``json_values``
elif [ condition ]; then
``json_values``
fi
done
提前致谢。
【问题讨论】:
-
我用其他方法解决了这个问题。在那里更新
-
那么,如果这不能解决我的问题,我需要标记为已解决吗? @Inian
-
为什么删除你的评论@Inian
-
请edit您的问题包括minimal reproducible example;我们可以复制粘贴并处理的东西。
-
@user47:我会留给你的判断!谢谢