Installation
Linux
Snap
Using snap
sudo snap install yqWindows
Winget
Using winget
winget install --id MikeFarah.yq
winget upgrade --id MikeFarah.yqUsage
# Convert JSON to YAML
# https://stackoverflow.com/a/77088493
yq -p json -o yaml swagger.json > openapi.yaml# Get unique tags from markdown files
find \
-name "*.md" \
-exec yq \
--front-matter extract \
'.tags // [~]' {} \; > temp.yaml
yq 'unique | sort' temp.yaml