I have a script running on a Unix server that writes data to a file with a .log extension and the file is competely overwritten with the new data correctly. The script then writes the same data in the same way to a file with a .bak extension and some of the data seems to be appended to some of the existing data in the file rather than completely overwriting.
The same script running on my own PC under Windows and with a Xitami server overwrites both files in the same way.
Can anyone explain this please?