What does “plus colon” (“+:”) mean in shell script expressions?

前端 未结 4 1251
既然无缘
既然无缘 2020-11-28 13:25

What does this mean?

if ${ac_cv_lib_lept_pixCreate+:} false; then :
  $as_echo_n \"(cached) \" >&6
else
  ac_check_lib_save_LIBS=$LIBS
4条回答
  •  庸人自扰
    2020-11-28 14:02

    Shell Parameter Expansion documentation for bash is here. No mention of +:, though it does mention :+:

    ${parameter:+word}
    If parameter is null or unset, nothing is substituted, otherwise the expansion of word is substituted.

提交回复
热议问题