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

[REBOL] Re: SAVE each elements to a new line

From: carl:cybercraft at: 10-Aug-2002 21:15

On 10-Aug-02, Philippe Oehler wrote:
> Hey, > is it possible to save each elements to a new line ? > Here's an example. > holiday.txt is : > ["1" "2-Sept-2002"] > ["2" "23-Sept-2002"] > the rebol script is > rebol [] > a: load %holiday.txt > append/only a ["3" "29-Sept-2002"] > save %holiday.txt a > The result is : > ["1" "2-Sept-2002"] > ["2" "23-Sept-2002"]["3" "29-Sept-2002"] > instead of > ["1" "2-Sept-2002"] > ["2" "23-Sept-2002"] > ["3" "29-Sept-2002"] > Notes: I want to use load and save, not write/append/lines
Using... append/only a load join "^/" mold ["3" "29-Sept-2002"] would do what you want (I think) but it's not too nice, as the block's converted to a string and then back again before it's appended. Formatting blocks has been discussed a bit before and I don't think any perfect answer was found. -- Carl Read