bbb324

mac 查看本机ip

创建 ip.sh 文件,文件内容为

ifconfig -a | grep -e "inet[^6]" |\

  sed -e "s/.*inet[^6][^0-9]*\([0-9.]*\)[^0-9]*.*/\1/" |\

  grep -v "^127\."

chmod a+x ip.sh

就可以用了

分类:

技术点:

相关文章: