shell-编程常用命令

hostnamectl set-name ${HOSTNAME,,}    # 主机名大写to小写
sed -i "s#search#replace#g" file    # 替换file中字符串
date '+%Y-%m-%d %H:%M:%S'        # 以"yyyy-mm-dd HH:MM:SS"格式输出

Last updated

Was this helpful?