Created
March 20, 2024 03:52
-
-
Save latermonk/119e4251c90e4cdccc544d2884d605cf to your computer and use it in GitHub Desktop.
Yq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```bash | |
# Read the key-value pair from source.yaml and store it in a variable | |
value=$(yq e '.key' source.yaml) | |
# Update target.yaml with the value from source.yaml | |
yq e ".key = \"$value\"" -i target.yaml | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment