我正在编写一个 shell 脚本并尝试检查是否存在两个文件。这是脚本示例:
#!/bin/bash
if [[ [ -e File1Name ] -a [ -e File2Name ] ]]
then
echo Yes
el
echo No
fi
并得到
script: line 5: conditional binary operator expected
script: line 5: syntax error near `-e'
script: line 5: `if [[ [ -e CA ] -a [ -e CA-draw ] ]]'
我的脚本有什么问题并且需要修复它?