Hi Graham,

thanks for your immediate help. It works as i need it. Thats the way i
was searching for the whole yesterday evening. Perhaps it was to late
and i do not have "pick" coming to my mind.

Thanks

Thorsten


On Mon, 5 Sep 2005 20:34:09 +1200, "Graham Chiu" <[EMAIL PROTECTED]>
said:
> 
> Hi Thorsten
> 
> Will this work for you?
> 
> foreach line sourcefile [
>    cells: parse/all line ","
>    foreach mline map [=20
>      write/append join tpath mline/1=20
>      rejoin [ pick cells to-integer mline/2   pick cells to-integer
> mline/3 " " mline/4 " " newline ]
>  ]
> ]
> 
> 
> On 9/5/05, Thorsten Moeller <[EMAIL PROTECTED]> wrote:
> >=20
> > Hi,
> >=20
> > i made a small script to split a file. I use a series containing the
> > rules how every row in the source should be splitted. The problem i have
> > is when i want to compose the new lines from the rules. A little example
> > should make it more clear:
> >=20
> > sourcefile: read/lines %/c/temp/sourcefile.txt
> > tpath: %/c/temp/
> >=20
> > map: [ ["filename1.txt" "1" "8" "q"]
> > ["filename2.txt" "1" "11" "m"]
> > ["filename3.txt" "1" "27" "m"]
> > ["filename4.txt" "1" "17" "q"]
> > ]
> >=20
> > foreach line sourcefile[
> >     cells: parse/all line ","
> >     foreach mline map [ write/append join tpath mline/1 reduce [join
> >     "cells/" mline/2 join " cells/" mline/3 " " mline/4 " " newline ]];
> >     -- Problem
> > ]
> >=20
> 
> --=20
> Graham Chiu
> -- 
> To unsubscribe from the list, just send an email to 
> lists at rebol.com with unsubscribe as the subject.
> 

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to