Skip to content

Overwriting tags when merging documents #1298

Answered by mikefarah
Sleavely asked this question in Q&A
Discussion options

You must be logged in to vote

The latest 4.27.3 release has a new merge flag 'c' to 'clobber' custom tags - give it a go

yq ea -i '. as $item ireduce ({}; . *c $item )' file1.yml file2.yml

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@mikefarah
Comment options

@Sleavely
Comment options

@mikefarah
Comment options

@Sleavely
Comment options

Comment options

You must be logged in to vote
1 reply
@Sleavely
Comment options

Answer selected by Sleavely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants