shell脚本常用参考
Shell 脚本常用参考 echo cat read sed awk cat 1 2 3 4 5 6 cat > /path/${TEMP}/account.conf<<EOF export ${API_ID_HEADER}="${API_ID_INPUT}" export ${API_KEY_HEADER}="${API_KEY_INPUT}" EOF # 单引号转译内容 # cat > /path/${TEMP}/account.conf<<'EOF' sed 1 2 3 4 5 6 7 8 sed -i \ -e '/Port 22/a\Port 22222' \ -e '/^PasswordAuthentication.*yes$/s/yes/no/g' \ -e '/^PermitRootLogin.*no$/s/no/yes/g' \ -e '/^#PermitRoot.*yes$/s/#PermitRoot/PermitRoot/g' \ -e '/#ClientAliveInterval/s/#ClientAliveInterval 0/ClientAliveInterval 30/g' \