Linux bash script to extract IP address

前端 未结 13 2438
我在风中等你
我在风中等你 2020-12-04 15:44

I want to make big script on my Debian 7.3 ( something like translated and much more new user friendly enviroment ). I have a problem. I want to use only some of the informa

13条回答
  •  囚心锁ツ
    2020-12-04 16:17

    If you want to get a space separated list of your IPs, you can use the hostname command with the --all-ip-addresses (short -I) flag

    hostname -I
    

    as described here: Putting IP Address into bash variable. Is there a better way?

提交回复
热议问题