Pharo 8 - OSProcess or OSSubProcess or ?
Hi - What is the recommended way to run a shell command from Pharo 8 and get the output from stdout into the image? Thanks Paul
Hi Paul, you can use: LibC resultOfCommand: 'dir' which is part of standard image. Bye T.
Gesendet: Montag, 04. Mai 2020 um 20:05 Uhr Von: "PAUL DEBRUICKER" <pdebruic@gmail.com> An: "Any question about pharo is welcome" <pharo-users@lists.pharo.org> Betreff: [Pharo-users] Pharo 8 - OSProcess or OSSubProcess or ?
Hi -
What is the recommended way to run a shell command from Pharo 8 and get the output from stdout into the image?
Thanks
Paul
Thanks Torsten That definitely works great. Sometimes I mistype the commands. Is there a way to get the error rather than an empty string? e.g. running LibC resultOfCommand: 'dur' gives an empty string rather than sh: dur: command not found ? Paul Torsten Bergmann wrote
Hi Paul,
you can use:
LibC resultOfCommand: 'dir'
which is part of standard image.
Bye T.
Gesendet: Montag, 04. Mai 2020 um 20:05 Uhr Von: "PAUL DEBRUICKER" <
pdebruic@
>
An: "Any question about pharo is welcome" <
pharo-users@.pharo
>
Betreff: [Pharo-users] Pharo 8 - OSProcess or OSSubProcess or ?
Hi -
What is the recommended way to run a shell command from Pharo 8 and get the output from stdout into the image?
Thanks
Paul
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Hi Paul, This blog post from Christopher Fuhrman may answer your question: https://fuhrmanator.github.io/2019/03/16/LibC-Pharo-experiments.html -Ted -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
participants (4)
-
PAUL DEBRUICKER -
Paul DeBruicker -
tbrunz -
Torsten Bergmann