openvz上的语法错误,用于在所有vps中执行命令

时间:2014-07-10 07:55:39

标签: syntax openvz

根据openvz的文档,我试图在所有vps中执行uptime命令,但是我收到语法错误

# echo "vps $i"; vzctl exec $i uptime; done
-bash: syntax error near unexpected token `done'

任何想法?

1 个答案:

答案 0 :(得分:0)

for i in `vzlist –o veid -H`; do echo "vps $i"; vzctl exec $i uptime; done