代码拉取完成,页面将自动刷新
#!/bin/bash
# Program:
# This program shows
# History:
# 2017-05-18 zmqc First release
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
OLDIFS=$IFS
IFS=$'\n'
wlp9s0=`ip a show wlp9s0|awk '/ether|inet/{print $2}'`
mylspci=`lspci |awk -F': ' '/(VGA|Eth|Net)/{print $2}'`
i=0
for var in $wlp9s0
do
myips[$i]="${var}"
i=$[$i + 1]
done
myIntel=`echo "${mylspci}"|grep -i 'intel'`
myAmd=`echo "${mylspci}"|grep -i 'amd'`
myEth=`echo "${mylspci}"|grep -i 'eth'`
myWifi=`echo "${mylspci}"|grep -i 'wifi'`
IFS=$OLDIFS
echo "Product Name:" `cat /sys/class/dmi/id/board_vendor` \
`cat /sys/class/dmi/id/product_version` \
`cat /sys/class/dmi/id/product_name `
echo "Bios Info:" `cat /sys/class/dmi/id/bios_vendor ` \
`cat /sys/class/dmi/id/bios_version ` \
`cat /sys/class/dmi/id/bios_date `
echo " OS:" `hostnamectl |awk -F ': ' '/System/{print $2}'`
echo " Kernel:" `uname -r`
echo " Shell:" "Bash" ${BASH_VERSION%(*}
echo " DE:" $XDG_CURRENT_DESKTOP
echo " CPU:" `cat /proc/cpuinfo |awk -F': ' '/model name/{print $2; exit}'`
echo " GPU:" $myIntel
echo " GPU:" $myAmd
echo " Eth:" $myEth
echo " Wifi:" $myWifi
echo " Time:" `date`
echo " Uptime:" `uptime --pretty`
echo " IPV4:" ${myips[1]}
echo " IPV6:" ${myips[2]}
echo " MAC:" ${myips[0]}
echo " RAM:" `free -h | awk '/Mem/{print $3 "/" $2}'`
echo " SWAP:" `free -h | awk '/Swap/{print $3 "/" $2}'`
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。