婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > Shell腳本獲取本地網(wǎng)卡IP、mac地址、子網(wǎng)掩碼、dns IP、外網(wǎng)IP

Shell腳本獲取本地網(wǎng)卡IP、mac地址、子網(wǎng)掩碼、dns IP、外網(wǎng)IP

熱門標簽:佛山高德地圖標注中心 東莞電銷機器人價格一覽表 百度地圖標注圖標更換 杭州機器人外呼系統(tǒng) 旅游地圖標注大全 地圖標注超出范圍怎么辦 百度地圖的地圖標注 excel地址地圖標注 陜西電銷卡外呼系統(tǒng)怎么安裝

#/usr/bin/env bash

# Name: get_network_info.sh
# Author: Purple_Grape
# This is a script to gather network information of your Linux system.
# Test under Ubuntu 10.04 only.

#----------------------------
NIC=eth0
MAC=`LANG=C ifconfig $NIC | awk '/HWaddr/{ print $5 }' `
IP=`LANG=C ifconfig $NIC | awk '/inet addr:/{ print $2 }' | awk -F: '{print $2 }'`
MASK=`LANG=C ifconfig $NIC | awk -F: '/Mask/{print $4}'`
ext_ip=`curl ifconfig.me`

if [ -f /etc/resolv.conf ];
then
   dns=`awk '/^nameserver/{print $2}' /etc/resolv.conf `
fi
#----------------------------
echo "Your network information is as below:"
echo $MAC
echo $IP
echo $dns
echo $ext_ip

您可能感興趣的文章:
  • 獲取同一網(wǎng)段下所有機器MAC地址的shell腳本

標簽:通遼 西藏 隨州 延邊 青島 朝陽 雅安 南充

巨人網(wǎng)絡(luò)通訊聲明:本文標題《Shell腳本獲取本地網(wǎng)卡IP、mac地址、子網(wǎng)掩碼、dns IP、外網(wǎng)IP》,本文關(guān)鍵詞  Shell,腳本,獲取,本地,網(wǎng)卡,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《Shell腳本獲取本地網(wǎng)卡IP、mac地址、子網(wǎng)掩碼、dns IP、外網(wǎng)IP》相關(guān)的同類信息!
  • 本頁收集關(guān)于Shell腳本獲取本地網(wǎng)卡IP、mac地址、子網(wǎng)掩碼、dns IP、外網(wǎng)IP的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 青阳县| 桐乡市| 蓬安县| 施甸县| 彩票| 桐梓县| 全州县| 石渠县| 盐城市| 漯河市| 肃南| 江华| 华安县| 永吉县| 沾益县| 儋州市| 锡林郭勒盟| 启东市| 勃利县| 南郑县| 台山市| 洪雅县| 汉阴县| 新乐市| 磐石市| 沛县| 本溪| 乌拉特中旗| 长沙县| 赤壁市| 沙湾县| 松江区| 高陵县| 柳州市| 九台市| 赤水市| 华亭县| 黎城县| 肇源县| 平顶山市| 那曲县|