在bash脚本中,我读取文件aa001
并返回第一个值。当第一个值等于1时,在终端上返回ok
之类的消息
#!/bin/bash
varReprise=`head -n 1 aa001`
echo $varReprise
un=1
if [`$varReprise` = `$un`]
then
echo " OK "
else
echo "not Ok"
fi
但是当我运行脚本时出现以下错误:
./test: ligne 5: 1 : command not found
./test: ligne 5: [: « ] » command not found