mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19: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 |