[问题]求助,如下错误提示是什么意思?
发表于 : 2008-01-22 9:49
错误提示:
sh06-2.sh: 2: Program:: not found
[: 15: ==: unexpected operator
[: 15: ==: unexpected operator
[: 21: missing ]
[: 21: ==: unexpected operator
源程序如下:
#!/bin/bash
Program:
# This program will show the user's choice
# History:
# 2008/1/22 liukai First release
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#Program body
read -p "please input (Y/N): " yn
if [ "$yn" == "Y" ] || [ "$yn" == "y" ]; then
echo "OK,continue"
exit 0
fi
if [ "$yn" == "N"] || [ "$yn" == "n" ]; then
echo "OK,continue"
exit 0
fi
echo "I don't know what is your choise" && exit 0
sh06-2.sh: 2: Program:: not found
[: 15: ==: unexpected operator
[: 15: ==: unexpected operator
[: 21: missing ]
[: 21: ==: unexpected operator
源程序如下:
#!/bin/bash
Program:
# This program will show the user's choice
# History:
# 2008/1/22 liukai First release
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#Program body
read -p "please input (Y/N): " yn
if [ "$yn" == "Y" ] || [ "$yn" == "y" ]; then
echo "OK,continue"
exit 0
fi
if [ "$yn" == "N"] || [ "$yn" == "n" ]; then
echo "OK,continue"
exit 0
fi
echo "I don't know what is your choise" && exit 0