|
|
Smalltalk Shell Scripting
written by Tomas Vanak, Providing A European Smalltalk Perspective Version 1, Sat, 20040103 Version 2, Sat, 20040819, Edited by PWL for new content system. I'm working on Smalltalk shell scripting. The first version is downloadable here stsh.tgz. Installation: Untar, then copy stsh to /usr/local/bin/, copy the libraries to /usr/local/lib. Then modify the test script hello.st - first line should point to /usr/local/bin/stsh. Run ./hello.st. The code itself is very short: Smalltalk commandLineArguments first asFilename fileIn. There is only the near-to-minimum subset of classes (libbasic + libbasic2). The first application I tried is a simple cgi application printenv. The source code is: #!/usr/local/bin/stsh
'Content-type: text/plain
' print.
'Smalltalk Script test' printCR.
#('PATH') do: [:aName |
(aName , ': ', (OperatingSystem getEnvironment:aName)) printCR].
'.' printCR.
You can see the result at http://www.vanak.cz/cgi-bin/printenv Comment by Peter Lount Excellent idea Tomas. Cool thing that your working on, Smalltalk Shell Scripting. Is it possible with other Smalltalk's, like Squeak? How does it work? What kinda of new classes are needed to make the shell scripting easy? Copyright 1 9 9 9 - 2 0 1 0 b y S m a l l t a l k . o r g "! , A l l R i g h t s R e s e r v e d . |
|