How do you execute an external process in VisualWorks Smalltalk?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use ExternalProcess fork
. e.g. ExternalProcess fork: 'date'.
.
However, fork
will only take one program and the arguments have to be passed separately in an array. If you want a more complex command you can use the shOne:
method: ExternalProcess shOne: 'test -d data || mkdir data && cd data'.