![尋找配對的「」時出現意外的EOF](https://rvso.com/image/1452280/%E5%B0%8B%E6%89%BE%E9%85%8D%E5%B0%8D%E7%9A%84%E3%80%8C%E3%80%8D%E6%99%82%E5%87%BA%E7%8F%BE%E6%84%8F%E5%A4%96%E7%9A%84EOF.png)
JACOB=192.168.1.66
ZAC=192.168.1.65
echo "Type someone's name, or type ? to list options."
read OPTNAME
if [ $OPTNAME = "?" ]; then
echo "Jacob's Computer: Type 'JACOB'"
echo "Zac's Computer: Type 'Zac'"
echo "Help: Type 'Help'"
else
if [ $OPTNAME = "JACOB" ]; then
echo "Jacobs Computer chosen."
echo "Now, enter the directory of the file you want to put onto this computer."
read FILEPATH
echo "Okay, would you like to specify a directory on the other computer, in which to place the file? (y/n)"
read YN
echo "DEBUG $YN"
if [ $YN = "y" ]; then
echo "Okay, in which directory would you like to put the file?"
read FILETO
echo "Are you ready to send the file? y/n"
echo "Reciever name: $OPTNAME"
echo "File to send: $FILEPATH"
echo "Where to put the file: $FILETO"
elif [ $YN = "n" ]; then
echo "Are you ready to send the file? y/n"
echo "Reciever name: $OPTNAME
echo "File to send: $FILEPATH"
echo "Where to put the file: N/A"
fi
elif [ $OPTNAME = "ZAC" ]; then
echo "Zacs Computer chosen."
fi
fi
這是我編寫的程式碼,能夠指定文件和使用者將文件發送到他們的電腦。我遇到一個問題,當我運行它時,它會返回以下錯誤:
filetransfer.sh: line 32: unexpected EOF while looking for matching `"'
filetransfer.sh: line 35: syntax error: unexpected end of file