Performing atomic write operations in a file in bash
After going through the bash documentation, this question and this one it’s still not clear to me how can I perform atomic write (append) operations to a file in bash. I have a script that is run in multiple instances and at some point must write data to a file: