In case the script (or the underlying framework implementation) is repeatedly opening and closing the file handle during its work, it may encounter a sharing violation error in the subsequent write-mode open for the following reasons:
1) The script may request the write access in exclusive mode (excluding concurrent read access), so if your file editor/viewer program is even only reading the file yet, it may trigger a fault in the writing script.
2) Additionally, some file editors/viewers lock the file for the entire duration they have the file open.
In conclusion, there are possible problems that depend on the program you are using for viewing the file. And there are possible problems arising from the implementation (or the underlying framework) of the script that writes to the file.
4That. Also if you know beforehand you could just pipe the scripts output though tee. – Hennes – 2018-05-06T21:58:58.940
1
Semi related is the tee commando: you can forward the output to some file and to the terminal at the same time: http://man7.org/linux/man-pages/man1/tee.1.html
– Cheiron – 2018-05-07T14:19:25.977