I am struggling to find out is there a way to feed input
to the interactive command of gst a.st b.st ... -
and redirect the output. Normally, the interactive buffer will
have st> ... and when you type a command it will output something by calling
the default/override displayString method to the interactive output. How to get the input
and feed the output using linux command or maybe a tiny smalltalk test script to do that.
Thank you.
How to use text file as input to feed in the interactive input of smalltalk and redirect output to a file
292 Views Asked by ddttdd At
1
Here's a contrived demonstration program. It reads in strings from standard input until EOF, sorts them, then prints them out:
You can run it interactively (pressed Ctrl-D after entering
hhh):Or I can create a text file
test.inwith the following contents:Then run:
And then check the contents of the output file:
If your program has prompts, they will appear in the output file, of course. Anything going to
stdoutwill go to that file.