[REBOL] Re: Creating a list, writing it in a file
From: joel:neely:fedex at: 11-Apr-2002 14:48
Hi, Richard,
COFFRE Richard FTO wrote:
> Hi,
>
> Reading lines in a file, I want to create a list which each item
> is a line,
>
Perhaps I don't understand, but here's a sample file:
8<----------lines.txt----------
this
is
a
simple
example
of
line
by
line
text
input
8<-----------------------------
here's a REBOL one-liner that uses it:
8<------------------------------
write/lines %sorted.txt sort read/lines %lines.txt
8<------------------------------
and here's the resulting data file:
8<---------sorted.txt-----------
a
by
example
input
is
line
line
of
simple
text
this
8<------------------------------
Hope this helps!
-jn-