feat: json export

This commit is contained in:
2025-02-13 17:26:51 +06:00
parent 64858bb9b6
commit 0cbbf66733
6 changed files with 45431 additions and 0 deletions

23
merge_json.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
if [ "$#" -ne 3 ]; then
echo "Usage: $0 input1.json input2.json output.json" >&2
exit 1
fi
i1="$1"
i2="$2"
out="$3"
echo "input 1 len: $(jq 'length' "$i1")"
echo "input 2 len: $(jq 'length' "$i2")"
jq -s '.[0] + .[1]' "$i1" "$i2" >"$out"
if [ $? -eq 0 ]; then
echo "merged files into $out"
echo "output len: $(jq 'length' "$out")"
else
echo "error merging files" >&2
exit 1
fi