mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 05:38:04 +00:00
8 lines
229 B
Bash
Executable File
8 lines
229 B
Bash
Executable File
#!/bin/bash
|
|
# ./yq ea '.[]' examples/data*.yaml
|
|
|
|
|
|
./yq ea '
|
|
((.[] | {.name: .}) as $item ireduce ({}; . * $item )) as $uniqueMap
|
|
| ( $uniqueMap | to_entries | .[]) as $item ireduce([]; . + $item.value)
|
|
' examples/data*.yaml |