Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] AW: Standard input hangs rebol? Re:

From: jean:holzammer:faedv-n:bayern at: 26-Jul-2000 13:32

> *********** REPLY SEPARATOR *********** > > On 00-07-24 at 19:19 [petr--xanadu--ru] wrote: > > >Hello, rebol community! > > > >I have the following rebol-script: > >----- > >REBOL[] > >probe "hello, world!" > >----- > > > >when I say at command prompt "rebol/rebol -q hello-world.r" it works of > >course. But when I say "echo 12345|rebol/rebol -q hello-world.r" it
hangs!
> > > >Could somebody be so kind as to explain what happens? > >I have REBOL/Core 2.3.0.4.2 under Linux. > > > >Petr > > Try "echo 12345|rebol/rebol -qc hello-world.r" > Mark >
Though I don't use Linux myself, I have an idea: You use the pipe ( | ). So the Shell first executes "echo 12345" and stores the output of the console (here: 12345). Then it executes the second command in the pipeline ("rebol/rebol -q hello-world.r") and attaches the previously stored value (12345) as an command line argument. So de factto the shell does the following: rebol/rebol -q hello-world.r 12345 There might be an error in this call. Rebol stops executing the script without quitting the interpreter ("hangs"). But you don't see the error msg as you started the interpreter with the quiet option set. Try and start Rebol without -q. Jean