#! /bin/bash
#Description:Is a System Info
#Author:Qiaohaoran
#Date:2014-7-13
#Version:1.0
#System OS:Linux
#System Ipaddress
IPADDR=`ifconfig | sed -n '2p' | awk '{print $2}' | cut -f 2 -d:` System_OS=`lsb_release -a | sed -n '3p' | awk '{print $2,$3,$4,$5,$6}'` Cpu_yu=`top -n 1| sed -n '3p' | awk '{print $5}' | cut -f 1 -d%` Mem_info=`free -m |sed -n '2p' |awk '{print $2,$3}'`
Swap_info=`free -m | tail -1|awk '{print $1,$2,$3}'`
cace()
{ echo -e "\033[31mIPAddress:$IPADDR\033[0m"
echo -e "\033[31mSystem OS:$System_OS\033[0m"
echo -e "\033[31mCpu Info :$Cpu_yu\033[0m"
echo -e "\033[31m total used\033[0m"
echo -e "\033[31mMem:$Mem_info\033[0m"
echo -e "\033[31m$Swap_info\033[0m" } cace;