Re: Use Shell Command from Pharo
Posted by
John Pfersich on
Mar 19, 2016; 5:07am
URL: https://forum.world.st/Use-Shell-Command-from-Pharo-tp4885330p4885419.html
if you do something like this:
| p d |
p := (PipeableOSProcess command: 'touch files.txt').
p keepInitialStdOutOpen: true.
d := Delay forMilliseconds: 250.
d wait.
[Transcript show: (p next: 300); flush. p atEnd] whileFalse: [d wait].
Transcript show: (p errorUpToEnd).
p closeOutput.
then you'll get this for output:
touch: files.txt: Permission denied
because you're trying to do a touch in the root directory