Can't use '||' with '[' in bash.
ok,
Thanks, Zhangyu
FYI:
- https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.ht...
- https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.htm...
Thanks, RenWen
local ip=$(ipmitool lan print | awk 'NR==3{print $4}') [ -n "$ip" ] && echo "ipmi_ip:" $ip
-- 2.23.0