[squeak-dev] Console smalltalk program.
Michael van der Gulik
mikevdg at gmail.com
Fri Mar 19 02:26:28 UTC 2010
On Fri, Mar 19, 2010 at 3:15 PM, Adrian Norberto Marino
<adrianmarino at gmail.com> wrote:
> Thanks for all!
> First of all apologies for my low level of English.
> I Found a way to execute smalltak code from a squeak image
> from unix bash that was what he needed, Of the next form:
> 1. evaluate "ExternCommandShell start" from squeak image.
> 2. Close squeak image
> 3. run from unix shell(bash): squeak -headless myImage
> 4. This open a sqsh interpreter.
> 4. Now run by example: Array with: 'Helo'
> it possible execute a squeak smalltalk expression of the next way?
> bash$ squeak -headless myImage Array with: 'Helo'
> my idea is execute a smalltalk espression directly desde bash.
This has been discussed before. If you search this mailing list,
you'll find a discussion.
"OSProcess arguments" will return the arguments passed on the command line.
Then you'll also want to know about:
SystemDictionary>>addToStartUpList: " lets you run code when the
image starts. "
(Smalltalk is the only instance of SystemDictionary)
SmalltalkImage>>snapshot:andQuit:embedded: " To shut the image down
and return to bash. "
"Compiler evaluate:" will compile and run code.
Or... I think that GNU Smalltalk supports this kind of thing much better.
More information about the Squeak-dev