#! /bin/bash
echo -e "主机名 " : `hostname`
echo -e "IPv4地址 :"`ifconfig | sed -n 2p |tr -s " " | cut -d " " -f 3`
echo -e "操作系统版本 :" `cat /etc/redhat-release`
echo -e "内核版本:" `uname -r`
echo -e "CPU型号:" `lscpu|sed -n 13p | tr -s " " |cut -d " " -f2-`
echo -e "内存大小 :" `cat /proc/meminfo | grep MemTotal`
echo -e "硬盘大小:" `lsblk | grep -E '^sda' | grep -Eo [0-9]+[[:upper:]]`