Last active
June 10, 2021 14:43
-
-
Save bartoszm/5141063078a2073d449c08dcaaa94856 to your computer and use it in GitHub Desktop.
Remove all nodes from YAML matching the pattern (name starts from '@)
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
yq -w 250 -Y -i '[(paths | select(.[-1] | tostring | test("^@")))] as $paths | delpaths($paths)' <<file>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment