in reply to Re: File content written by script and a called script
in thread File content written by script and a called script

Further to this, OP may want to check out

    Writing to one file from multiple processes
    File locking
    What the flock!? Concurrency issues in file writing.

and there is a lot of useful discussion in

Just a something something...
  • Comment on Re^2: File content written by script and a called script