为什么第三个`if`语句是错误的?

时间:2019-07-24 03:33:24

标签: linux shell

下面,第三条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语句将不会执行。

0 个答案:

没有答案