• # En shell

    Posté par (site web personnel) . En réponse au message commandes réseaux. Évalué à 3.

    Il doit y avoir plus simple, mais ma première idée c'est d'utiliser la sortie de ifconfig:
    $ ifconfig | head -2 | tail -1 | tr -s ' ' | cut -d ' ' -f 3 | cut -d ':' -f 2

    https://damien.pobel.fr