Hello All:
test file is test.txt
contents are:
line one 
line two
line three
line five

;The following code seeks to identify the third line and
;inset a line after it:
fp: open/lines/write %test.txt
  forall fp
  [
    if(find first fp "three") ; identify third line
    [
      print first fp          ; tell user it's been found
      insert fp "line four"   ; insert?
    ]
  ]
update fp ; "post"
close fp
;;Two questions:
;; 1)the inserted line ist not being inserted. Why and How?
;; 2)What code can I insert so that rebol will not prompt
;;   for permission.

Thanks
Tim

Reply via email to