We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please describe your feature request. yq should support sh macros to allow any custom string manipulation.
Describe the solution you'd like
Example:
There is a secrets file like this:
a: token: "abcdef" b: token: "xyz"
I want to get some hashes of these secrets:
yq -o=tsv '.. | { "k": path | join("."), "v": .token | @sh "echo -n ${1} | sha256sum | cut -d\' \' -f1" } | .k + ": " + .v' secrets.yml
This should print something like:
a: ae0666f161fed1a5dde998bbd0e140550d2da0db27db1d0e31e370f2bd366a57 b: f34fe622a8fe7565fc15be3ce8bc43d7e32a0dd744ebef509fa0bdb130c0ac31
Describe alternatives you've considered Using shell with multiple lines of code
Additional context
The text was updated successfully, but these errors were encountered:
Similar by the chosen example but not exactly the same: #2283
Sorry, something went wrong.
No branches or pull requests
Please describe your feature request.
yq should support sh macros to allow any custom string manipulation.
Describe the solution you'd like
Example:
There is a secrets file like this:
I want to get some hashes of these secrets:
This should print something like:
Describe alternatives you've considered
Using shell with multiple lines of code
Additional context
The text was updated successfully, but these errors were encountered: