[REBOL] stdout instead of print? Re:
From: joel:neely:fedex at: 8-Sep-2000 10:24
Print DOES send data to stdout, but not if you're running in an
interactive session.
Create a file named testing.r (assuming you're in a *nix/*nux
environment, as you asked about piping and date) which reads as
follows (not including the hyphen-bar delimiters:
=============================================================
#!/usr/local/bin/rebol -sq
REBOL []
; set this variable however you wish...
date-string: "0907225000"
print "this"
print "is"
print "a"
print "test"
print date-string
=============================================================
The first line may need to be different on your system, depending
on where you have installed REBOL.
Now, at the shell, enter the commands
=============================================================
chmod 744 testing.r
./testing.r
./testing.r | sort
=============================================================
The first command makes the file executable. The second should
produce the output:
=============================================================
this
is
a
test
0907225000
=============================================================
The second should produce the output:
=============================================================
0907225000
a
is
test
this
=============================================================
That's how to pipe from REBOL to another process.
Having said all that...
You can only set the date on your system as root. Where is the
script getting the value of date-string from? I'm just highly
puzzled as to the use (and safety) of the exact example you asked
about.
-jn-
[balayo--mindspring--com] wrote: