11 lines
324 B
Bash
11 lines
324 B
Bash
#! /bin/bash
|
|
cd "$(dirname "$(realpath "$BASH_SOURCE")")"
|
|
cat 2* \
|
|
| gojq -c --yaml-input '.[] | {when: .when, s: .rendered}' \
|
|
| grep -v null \
|
|
| grep -v '""' \
|
|
| $(which jq) -r -c . \
|
|
| sort \
|
|
| $(which jq) -s 'group_by(.when) | map({key: (.[0].when | tostring), value: [.[] | .s]}) | from_entries' \
|
|
| gojq --yaml-output
|