Output full document where a given line is found #1853
Closed
chipzoller
started this conversation in
General
Replies: 1 comment 1 reply
-
Without having a sample document it's hard to you the answer - it seems like you need to use the
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, been using
yq
for a while and it's a tremendously useful tool. One thing I've been trying to do is a simple way to say, "give me the full YAML document found within this file (which contains multiple) where a given line is found." For example, you perform ahelm template
and get back a ton of resources, but I want to get only one of those but see the entire YAML for that resource. I'm trying to avoid usinggrep -A
and manually specifying number of lines. Is there an easy way to do this inyq
or would it also involve a nasty query string?Beta Was this translation helpful? Give feedback.
All reactions