CommandShell and stream protocol

frits.swinkels frits.swinkels at
Wed Nov 21 23:18:41 UTC 2007

I installed CommandShell in a small 3.7 image.

On evaluating the following line in a bash shell I get a 4 lines 
response of file paths
find /home/frits/DB -exec grep -q "France" ''{}'' \; -print

When I evaluate
command := PipeableOSProcess command: ' find /home/frits/DB -exec grep 
-q "France" ''{}'' \; -print' . in a workspace I get a string with the 
correct 4 file names separated by ASCII 10.

The documentation (almost unique in the Squeak world, thanks;) states 
that there are three streams: input output and error. Thus I expected to 
use a stream protocol like:

command := PipeableOSProcess etc
output := command output.
[output atEnd] whileFalse: [ output next......]
and get myself a list (and not a string) of file names.

I must misunderstand something. Any way of achieving such an result: 
e.g. a pipe which blocks till items are removed?

(I googled and searched the archives, no luck although I believe this 
must have come up before.)

More information about the Squeak-dev mailing list