Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

Shell使用Jenkins的boolean值

#!/bin/bash
if ! [[ $SKIP_TESTS == true ]] ; then
  #Do something if condition match
fi

#!/bin/bash
GRAY_MODE=false
availabilityZone=ap-southeast-1c
if [[ $GRAY_MODE = true && "$availabilityZone" = "ap-southeast-1c" || $GRAY_MODE = false && "$availabilityZone" = "ap-southeast-1a" ]] ; then
  #Do something if condition match
fi

===功能一致,但是如果使用=判断,=号两边必须加空格,否则认为是赋值语句

上一篇 Shell替换字符串的几种方法:变量替换,sed,awk
下一篇 screen状态为Attached连接不上