当前位置: 技术问答>linux和unix
syntax error: unexpected end of file
来源: 互联网 发布时间:2016-06-27
本文导语: The following shell has an exception echo "success" PATH_SEPARATOR=':' echo $PATH_SEPARATOR if [ $PATH_SEPARATOR = ':' ]; then echo "success" fi 运行: [sh]$ ./javainvoke.sh success : ./javainvoke.sh: line 7: syntax error: unexpected end of file ple...
The following shell has an exception
echo "success"
PATH_SEPARATOR=':'
echo $PATH_SEPARATOR
if [ $PATH_SEPARATOR = ':' ]; then
echo "success"
fi
运行:
[sh]$ ./javainvoke.sh
success
:
./javainvoke.sh: line 7: syntax error: unexpected end of file
please help.
echo "success"
PATH_SEPARATOR=':'
echo $PATH_SEPARATOR
if [ $PATH_SEPARATOR = ':' ]; then
echo "success"
fi
运行:
[sh]$ ./javainvoke.sh
success
:
./javainvoke.sh: line 7: syntax error: unexpected end of file
please help.
|
#把‘ ’去掉试试
if [ $PATH_SEPARATOR = : ];
if [ $PATH_SEPARATOR = : ];