You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- associative array (hash table) to be
key01: val01
key02: val02
I'd like to use yq to do this, but I'm struggling. At the and of this process I'd like to have an object in zsh, lets call it AA which when I iterate over it returns:
for key value in ${(kv)AA}; do
echo "$key: $value"
done
#output
key01: val01
key02: val02
Can I have in my zsh script something like that: AA=some magic yq syntaxexample.yaml
How to do that? ( I've already read docuentation and done the web research :-) )
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let say I have
example.yaml
file as:I'd like to use
yq
to do this, but I'm struggling. At the and of this process I'd like to have an object in zsh, lets call itAA
which when I iterate over it returns:Can I have in my zsh script something like that:
AA=
some magic yq syntaxexample.yaml
How to do that? ( I've already read docuentation and done the web research :-) )
Beta Was this translation helpful? Give feedback.
All reactions