-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
I wonder whether there is a special class or mechanism to use Squeak in "batch mode".
Suppose for example that you have a script:
bash-4.4$ cat hello.sq
TranscriptStream redirectToStdOut. Transcript show:'hello world'. Smalltalk quitPrimitive
What seems to work - provided that the squeak.image has an open Transcript - then :
/usr/bin/squeak squeak.image hello.sq > out
or
/usr/bin/squeak -headless squeak.image hello.sq > out
writes 'hello world' to the file 'out'.
It's an expensive way to do that, but it works, it launches squeak, and in the display one can see the Transcript doing show:'hello world', and then the image quits (with the 'quitPrimitive').
With the -headless option the image is doing the same thing without display.
Two remarks:
- this works in Squeak 4.6 4.16.7-3775 - for some reason this doesn't seem to work in Squeak 5.3 (at least for me, this may be due to my VM in 5.3 not working correctly or some other oversight)
Is there perhaps a "BatchTranscript" class which is meant to be used for this?
Or a module "batch" for using Squeak in batch mode ...
Maybe I'm doing something wrong in V5.3 because I think a few days ago, it was working somehow also in 5.3 for me, not sure.
Anyway if there were would exist some sort of BatchTranscript in SqueakMap or Monticello , that would help...
Thanks! David Stes
-- Sent from: http://forum.world.st/Smalltalk-VM-Beginners-f3068605.html
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
It is thus possible to run squeak -headless in "headless mode"
and redirect : /usr/bin/squeak -headless squeak.image hello.sq > out
However it turns out that "GNU smalltalk" is more appropriate, for this kind of "batch-oriented" work.
Because GNU smalltalk can easily run in batch mode...
David Stes.
-- Sent from: http://forum.world.st/Smalltalk-VM-Beginners-f3068605.html
vm-beginners@lists.squeakfoundation.org