xuperchain / xuperchain

A highly flexible blockchain architecture with great transaction performance.

Home Page:https://xuper.baidu.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ubuntu run control.sh with: "Syntax error: Bad for loop variable"

zhugelianglongming opened this issue · comments

commented

Brief of the issue
Run control.sh with error: Syntax error: Bad for loop variable

Your environment

  • XuperChain: v5.3.0
  • OS: Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-1023-azure x86_64)
  • Go: go1.18.1 linux/amd64
  • Gcc: 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)

Repo steps

  1. Download Xuperchain v5.3.0
  2. make && make testnet
  3. cd testnet/node*
  4. sh control.sh start

Expected behaviours

...
start finish.pid:<PID>
Done!

What actually happened

Syntax error: Bad for loop variable

image

Picture shows script run with set -x

Additional information
Fix problem by bash control.sh start

Problem cause and solution: Syntax error: Bad for loop variable错误解决方法

Ubuntu下的sh命令是软连接到 /bin/dash,但是启动脚本里用的/bin/bash,所以你可以用bash control.sh start启动试试。

commented

Ubuntu下的sh命令是软连接到 /bin/dash,但是启动脚本里用的/bin/bash,所以你可以用bash control.sh start启动试试。

对的,我也是这么解决的