Standard input hangs rebol?
[1/3] from: petr:xanadu:ru at: 24-Jul-2000 19:19
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
[2/3] from: marek::tnet::pl at: 26-Jul-2000 13:07
*********** REPLY SEPARATOR ***********
On 00-07-24 at 19:19 [petr--xanadu--ru] wrote:
>Hello, rebol community!
>I have the following rebol-script:
<<quoted lines omitted: 7>>
>I have REBOL/Core 2.3.0.4.2 under Linux.
>Petr
Try "echo 12345|rebol/rebol -qc hello-world.r"
Mark
Marek "Juha" Piałucha
mailto:[marek--tnet--pl] - http://www.tnet.pl/~marek
phone: +48502837282 - IRC: #miedzyrzec
[3/3] 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:
<<quoted lines omitted: 8>>
> >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?
<<quoted lines omitted: 3>>
> 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
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted