入门shell脚本之小试牛刀

1、写一个脚本,检测并输出系统信息,包括: ip地址 ip=ip a | grep "scope global" | awk '{print $2}'|awk -F'/' '{print $1}' 当前时间 datetime=date "+%y年%m月%d日 %H:%M:%S" 登录用户 user=$USER 当前内存剩余 ram=free -h|grep Mem|awk '{print $4}'
相关文章
相关标签/搜索