2

我想在后台 运行我的bash脚本的一些实例。foo.bash

当我在命令行中写入for i in {1..10}; do ~/bin/foo.bash & ; done时,出现错误:bash: syntax error near unexpected token ;

您能否解释为什么会发生此错误以及如何修复该命令?

4

1 回答 1

8

&并且;都是命令分隔符;你不需要(也不能拥有)两者。

for i in {1..10}; do ~/bin/foo.bash & done
于 2012-08-20T09:10:50.217 回答