|
脚本是这样的,询问名字,如果名字是Cash,则在屏幕输出“Welcome Sir!”,如果名字是非“Cash”,则输出" lease get out!"
以下是我写的脚本,但是问题在于,不论我输入什么名字,他都会输出“Welcome Sir!”
#!/bin/sh
echo What is your name?
read $name
if [ $name="Cash" ]; then
echo "Welcome Sir!"
else
echo " Lease Get Out!"
fi
exit 0 |
|