Replies: 1 comment
-
TLDR:
Explanation:
Edit: formatting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to merge two yaml files using yq in bash script.Selecting only specific keys values , removing duplicates and building a string.
file1.yaml
file2.yaml
Desired Output:
Trying to build a command like below.
--from-literal=FT1=true --from-literal=FT2=true --from-literal=FT3=false --from-literal=FT4=false
What I have tried so far:
yq eval '. | to_entries| .[] | select(.key == "FT*") | [.key, .value] | join("=") file1.yaml
The above command output is as below. Not sure how to merge them , remove duplicates from file2 and build the command.
file1.yaml
FT1=true FT2=true
Beta Was this translation helpful? Give feedback.
All reactions