I am trying to write a shell script that looks for a file in a specified directory which is not being used. It is a log file which gets written sometimes. So I need an o/p something like this
return code 1 - If the file is found and not used
return code 2- If the file is not found
return code 3 - if the file is found but is being written.
Can someone please help me on this.