#!/bin/bash # Counts the number of cards in the given deck. yq r -j cards.yaml | jq -r --arg deckname "$1" '.decks[$deckname] | values | map(.count) | add'