TL;DR: It would be cool if all CLI apps supported JSON output, but in the meantime we can use jc

  • MonkderZweite@feddit.ch
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    Unfortunately, this is the state of things today if you want to grab the IP address of one of the ethernet interfaces on your linux system:

    $ ifconfig ens33 | grep inet | awk ‘{print $2}’ | cut -d/ -f1 | head -n 1

    State of things today is that ifconfig is deprecated, says even it’s manpage.