使用以下 shell 脚本,为什么会出现错误
syntax error near unexpected token `else'
Run Code Online (Sandbox Code Playgroud)
外壳脚本
echo "please enter username"
read user_name
echo "please enter password"
read -s pass
echo ${ORACLE_SID}
SID=${ORACLE_SID}
if ["${ORACLE_SID}" != 'Test'] then
sqlplus -s -l $USER_NAME/$PASS@$SID <<EOF
copy from scott/tiger@orcl insert EMP using select * from EMP
exit
EOF
else
echo "Cannot copy"
fi
Run Code Online (Sandbox Code Playgroud)