I have java application which takes a file, which is created by a process running on terminal. I start the process using a small shell script. Then run the Java application and it reads the file created by the process.
Whenever this system runs created file need to be removed so that the process creates it using the same name. I have no control over the file creation process so I cant overwrite or append to the file.
My question is, on which part should the file be deleted? In the Java application or the little shell script i wrote?
I'm sorry if other aspects of the system seems poorly designed but as I said I have little control over it.