Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • This is it, thank you. While I must admit that the solution using mlr is more elegant, I explicitly asked to avoid any additional tools and this is working, so I'm accepting this as an answer. On a side note, I thought it would be good to add the interface to the output, which can be achieved by exchanging .[].addr_info[] in the above with foreach .[] as $item (0; . +1; $item.addr_info [] as $a | {ifname: $item.ifname} * $a) Commented Sep 11, 2024 at 7:22
  • 1
    @hanjo, I've added a command that adds the ifname using an alternative approach. Commented Sep 11, 2024 at 7:58
  • this is even better, I learned above to avoid loops. Perfect 👍 Commented Sep 11, 2024 at 8:16