I try to run a background job in a for loop in bash:
for i in $(seq 3); do echo $i ; sleep 2 & ; done
I get error:
bash: syntax error near unexpected token `;'
In zsh the command line works.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…