下面,第三条if
语句有错误:
./if-5.sh: line 14: syntax error: unexpected end of file
脚本为:
#!/bin/bash
if [ -r /var/spool/mail/root ];then
echo "You can read the file."
fi
if [ -w /var/spool/mail/root ];then
echo "You can write the file."
if [ -x /var/spool/mail/root ];then
echo "You can execute the file."
fi
我认为第三个if语句将不会执行。