[squeak-dev] how to write to stdOut and stdErr under Cog

Chris Muller asqueaker at gmail.com
Sun Sep 26 21:46:23 UTC 2010


I am developing a simple "CommandLineProcessor" facade for easily
transferring command-line arguments simply as block-arguments, so you
can write smalltalk scripts in vi:

  CommandLineProcessor do: [ : arg1 : arg2 : arg3 | "args come in as
Strings" ... ]

and also for directing Notifications and Warnings messages to stdOut,
and Errors to stdErr.  It relies on OSProcess to write to stdOut and
stdErr for this.  However, ever since switching to Cog, writing to
these streams does not seem to redirect out to Linux..

I don't know whether writing to these streams makes me
Linux-dependent, but it really is nice to be able to write Linux
scripts that employ Squeak in the back-end, but operate normally like
other shell programs in the terminal window and with redirecting
output, etc.

 - Chris



More information about the Squeak-dev mailing list