I am just starting to use gnu-smalltalk
. I have taken following code from here and trying to run it with gst
command.
display_etc
| pipe |
pipe := FileStream popen: 'ls -l /etc' dir: FileStream read.
Transcript showCr: pipe contents. !
But it is giving error that it is not understanding basic symbol |
:
$ gst dir_etc.st
Object: nil error: did not understand #|
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
UndefinedObject(Object)>>doesNotUnderstand: #| (SysExcept.st:1448)
UndefinedObject>>executeStatements (dir_etc.st:2)
dir_etc.st:3: expected expression
Where is the problem and how can it be solved. Thanks for your help.