dengshuang
V2EX  ›  问与答

shell 函数中的 x 是干啥的啊

  •  
  •   dengshuang · May 31, 2018 · 2681 views
    This topic created in 2934 days ago, the information mentioned may be changed or developed.

    贴代码

    release="centos"

    boot_start(){ if [[ x"${release}" == x"debian" || x"${release}" == x"ubuntu" ]]; then update-rc.d -f ${1} defaults elif [[ x"${release}" == x"centos" ]]; then chkconfig --add ${1} chkconfig ${1} on fi }

    3 replies    2018-05-31 16:02:53 +08:00
    dengshuang
        1
    dengshuang  
    OP
       May 31, 2018
    boot_start(){
    if [[ x"${release}" == x"debian" || x"${release}" == x"ubuntu" ]]; then
    update-rc.d -f ${1} defaults
    elif [[ x"${release}" == x"centos" ]]; then
    chkconfig --add ${1}
    chkconfig ${1} on
    fi
    }
    dengshuang
        3
    dengshuang  
    OP
       May 31, 2018
    @laxenade 谢谢了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3062 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 07:14 · PVG 15:14 · LAX 00:14 · JFK 03:14
    ♥ Do have faith in what you're doing.