<分区>
伙计们,我是学习 bash 脚本的初学者,我不知道那是什么错误,我正在使用最新的 Ubuntu LTS,它给出了这个错误: ./greeting2.sh: 第 11 行:语法错误:意外的文件结尾
代码如下:
#!/bin/bash
echo -n "Hello, what is your name? "
read firstname
echo -n "Thank you, and what is your surname? "
read surname
clear
if [ "$firstname" == "Your name" ] && [ "$surname" == "Your surname" ]
then echo "Awesome name, " $firstname $surname
else echo You are not allowed to go!