It is actually not a native linux command, but rather something belonging to ROS (Robot Robot Operating System). I did not want to complicate the question further.. The behaviour is as I described it. This echo command sits still in the console where it was called, and waits. When some message is send, then it just prints the message on screen and waits. The pub method (also belonging to ROS) publishes a message and exits. I tried Ben's solution (thanks!), but unfortunately stringVar remains nil. I think the problem is we are assigning the output of the command to stringVar, which is nothing, at the moment. Any ideas? Thank you all.
El Tue Jan 13 2015 at 6:15:01, Ben Coman <b...@openinworld.com> escribió: > I've never known 'echo' to wait for input, and haven't heard of this echo > & pub combination. Do you have some link to a tutorial showing how they > are used? > > However just wildly guessing, are you wanting to get output from a long > running command without blocking the Pharo UI? > In that case, what about... > [ *stringVar := (PipeableOSProcess command: 'echo...') output ] > fork. * > *?* > *cheers -ben* > > On Tue, Jan 13, 2015 at 9:18 AM, Demian Schkolnik < > demianschkol...@gmail.com> wrote: > >> Hello everyone. >> >> I have the following question. I have a specific 'echo ...' command, >> which I send to the linux console via " OSProcess command:'echo ... ' ". >> This echo command, when executed on the native linux console, stands by >> until it receives some message. >> Following this, I have to execute a 'pub...' command, which gives some >> information that the echo command will print on screen. On linux, you run >> 'echo..' on a terminal and 'pub...' on another. >> My objective here is to capture the output of echo into a smalltalk >> variable for later use. >> Normally, if a console command prints something immediately to screen, I >> use >> *(PipeableOSProcess command:'some command') output.* >> >> It is here a little different though, since this command will not print >> something immediately to screen. I want to do something like this, where >> the final output of 'echo..' stays in stringVar. >> >> *stringVar := (PipeableOSProcess command: 'echo...') output. * >> *(Delay forSeconds:3) wait.* >> *(OSProcess command: 'pub... ').* >> *(Delay forSeconds:3) wait.* >> >> Thank you all. >> >> >> >> >