So here is what I wanted to do:
" Part 1: shut down running VMWare VMs"
shellCmd := '/usr/bin/vmrun list'.
pipe := FileStream popen: shellCmd dir: FileStream read.
pipe linesDo: [: vmName |
shellCmd2 := '/usr/bin/vmware-cmd %1 stop' bindWith: vmName.
pipe2 := FileStream popen: shellCmd2 dir: FileStream read. ]
Hence the need for a synchronous call so that the script waits until
each machine is shut down.
Do you need the output of the second command? If no, obviously you can
use popen for the outer loop and system for the inner loop. Otherwise,
closing a pipe or sending it #contents will also wait for the process to
end.
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk