2014-09-22 56 views

回答

2

您需要$(...)分配結果:

wdCount=$(echo $winget | wc -w) 

或者你也可以通過使用這裏文檔避免echo

wdCount=$(wc -w <<<$winget) 
相關問題