当前位置: 技术问答>linux和unix
shell脚本运行错误
来源: 互联网 发布时间:2016-09-28
本文导语: 提示:syntax error near unexpected token fi' #! /bin/sh PORT=389 echo "set the port of server: " read NEWPORT if [ "$NEWPORT" != "" ] PORT=$NEWPORT fi echo "port is:" echo $PORT 到底是什么原因啊 | if用法错误少了...
提示:syntax error near unexpected token fi'
#! /bin/sh
PORT=389
echo "set the port of server: "
read NEWPORT
if [ "$NEWPORT" != "" ]
PORT=$NEWPORT
fi
echo "port is:"
echo $PORT
到底是什么原因啊
#! /bin/sh
PORT=389
echo "set the port of server: "
read NEWPORT
if [ "$NEWPORT" != "" ]
PORT=$NEWPORT
fi
echo "port is:"
echo $PORT
到底是什么原因啊
|
if用法错误少了then
#! /bin/sh
PORT=389
echo "set the port of server: "
read NEWPORT
if [ "$NEWPORT" != "" ]
then
PORT=$NEWPORT
fi
echo "port is:"
echo $PORT
#! /bin/sh
PORT=389
echo "set the port of server: "
read NEWPORT
if [ "$NEWPORT" != "" ]
then
PORT=$NEWPORT
fi
echo "port is:"
echo $PORT