多个值时 if [ -z 报错 binary operator expected
if [ ! -z "\$client_pid" ]; then
报错: line 23: [: 662: binary operator expected
改成
if [[ ! -z "\$client_pid" ]]; then
即可。
unix - binary operator expected error when checking if a file with full pathname exists - Stack Overflow
bash - ERROR: binary operator expected - ZhangZhihuiAAA - 博客园 (cnblogs.com)