dengshuang
V2EX  ›  问与答

shell 函数中的 x 是干啥的啊

  •  
  •   dengshuang · May 31, 2018 · 2659 views
    This topic created in 2921 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   ·   2646 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 12:23 · PVG 20:23 · LAX 05:23 · JFK 08:23
    ♥ Do have faith in what you're doing.