#!/bin/sh
echo "Please enter your name here $RESPONSE!"
read RESPONSE
echo "Hello $RESPONSE, I will now create a new ${RESPONSE}_file for you"
touch ${RESPONSE}_file
echo "Would you like to remove this file. If yes, please enter in all lower
case"
read RESPONSE
if ["$RESPONSE" == "yes"];
then
rm ${RESPONSE}_file
fi
您好,
我认为我在实现目标方面有点误入歧途。每次运行此脚本时,我都会收到一条错误消息,指出" yes:命令未找到"错误。我知道shell不会将其作为字符串读取。我应该创建另一个存储结果的变量吗?我现在真的不知道如何使这项工作。非常感谢您的意见。