Parse ifconfig to get only my IP address using Bash

后端 未结 20 1289
甜味超标
甜味超标 2020-11-30 05:04

I want to edit the bashrc file to have a simple function called \"myip\" to run. As you might guess, the function myip prints only my internal IP address of my machine.

20条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 05:35

    After troubles with greping ifconfig I found a wrapper library to simplify my life

    pip install my_ip 
    mip
    

提交回复
热议问题