入門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}'
相關文章
相關標籤/搜索