字符串比较错误提示"unary operator expected"
if [ $nc_id = $nc_id_1 ];then
...
else
...
fifunction compare() {
if [ $nc_id = $nc_id_1 ];then
...
else
...
fi
}./check_string.sh: line 64: [: =: unary operator expected if [[ $nc_id == $nc_id_1 ]];then参考
Last updated