appending to a file with open
Fairlight
fairlite at fairlite.com
Tue Jul 30 09:17:34 PDT 2013
On Tue, Jul 30, 2013 at 11:03:48AM -0400, tob at b-e-s-t.com thus spoke:
> I have a simple prc that writes the total records to a file.
>
> cat prc.left
> ::end:
> @wgt:::
> ::az(50,*)="/u/tob/ckinvct":
> ::aa=open(az,"rwt"):
> ::az=@qu<@ts:
> ::ab=writeline(aa,az):
> ::end:
>
> It works as expected BUT it does not append to the file but creates a new
> one on every run. I would like it to append to the file.
> Thanks
> centos 5 / fp 5
::aa=open(az,"rwct"):
::ab=seek(aa,"0","2"):
That should open the file (I added the flag to create it if it doesn't
already exist), but then should seek to the end of file so you can write at
the end.
mark->
--
Audio panton, cogito singularis.
More information about the Filepro-list
mailing list