Learning to Manipulate YAML on the Command Line with YQ
<p>You are probably familiar with “jq”. Every developer or DevOps must have handled JSON data. “jq” is a lightweight and flexible command-line JSON processor akin to sed, awk, and grep. Those linux commands like sed, awk, and grep are awesome tools, but when you are working on formatted data like JSON or YAML, a private library that is developed for this format can be a better solution because you do not have to write complex linux command syntaxes.</p>
<p>“yq” is a lightweight and portable command-line YAML, JSON, and XML processor. “yq” uses “jq” as syntax but works with YAML files as well as JSON, XML, properties, CSV, and TSV. When you search for “yq”, you can find two repositories. But the “yq” tool we refer to in this article is mikefarah/yq, not “kislyuk/yq. When you try to install yq from the Ubuntu Snap repository, “mikefarah/yq” will be installed. The version needs to be "4.x" which is crucial. There are huge differences between “3.x” and “4.x”.</p>
<p><a href="https://baturorkun.medium.com/learning-to-manipulate-yaml-on-the-command-line-with-yq-531268d8805d"><strong>Read More</strong></a></p>