-Wind

mac osx 获取内网ip的方法

(1) ping -c 1 $(hostname) | grep -m 1 -oP \'(\d+\.)+\d+\' # ping selfhost and catch the first matched ip

 

(2) host $(hostname) | grep -oP \'(\d+\.)+\d+\' # catch matched ip from selfhost\'s hostname and ip

分类:

技术点:

相关文章:

  • 2021-12-12
  • 2022-03-05
  • 2021-05-25
  • 2021-06-11
  • 2021-06-08
  • 2023-03-24
  • 2021-10-19
猜你喜欢
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案