Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash 将开关箱拨入开关箱_Bash - Fatal编程技术网

Bash 将开关箱拨入开关箱

Bash 将开关箱拨入开关箱,bash,Bash,我想把开关箱换成开关箱。但我有一个错误 ### User prompts read -p "Would you like to download all source codes and build them? \"(Y|N)\" " inPut # Get user prompt not case sensitive case $inPut in # First case "y"|"Y") echo 'Starting.....' donwload_source_code read

我想把开关箱换成开关箱。但我有一个错误

### User prompts
read -p "Would you like to download all source codes and build them? \"(Y|N)\" " inPut
# Get user prompt not case sensitive
case $inPut in
# First case
"y"|"Y") echo 'Starting.....'
donwload_source_code

    read -p "Would you like to start all servers? \"(Y|N)\" " inPutserver
    case $inPutserver in
    "y"|"Y") echo 'Starting.....'
    open_new_terminals_automatically $DIR "rails -s"

;;

# Second case
"n"|"N") echo 'Stopping script execution...'
exit
;;

esac
我在运行脚本时出错:

run.sh: line 589: syntax error: unexpected end of file

如何修复此问题?

您尚未终止内部
案例
构造,该构造应如下所示

read -p "Would you like to start all servers? \"(Y|N)\" " inPutserver
case $inPutserver in
"y"|"Y") echo 'Starting.....'
open_new_terminals_automatically $DIR "rails -s"
;;
esac      # <------ Notice the termination here.
read-p“是否要启动所有服务器?\”(Y|N)\“inPutserver”
案例$inPutserver in
“y”|“y”)呼应“开始…”
自动打开\u新的\u终端\u$DIR“rails-s”
;;
以撒#