我正在尝试编写脚本。
这是我的代码的一部分
if [ #? -ne 0 ]
then
echo "Args:"
if [ -r $word.args ]
then
cat $word.args
fi
echo "Expected:"
cat $word.out
echo "Actual:"
cat $tempfile
fi
当我运行一些测试时,它总是在这一行显示“[: missing `]'”
if [ #? -ne 0 ]
为什么?