2013-12-18 31 views

回答

1

爲了評估命令並把結果存儲到一個變量,你需要做var=$(command)。在你的情況下:

a=$(vmquery -b -pn Scratch |grep -i ACS |grep -iw hcart3|wc -l)