I have a following problem I tried to solve but since my knowledge of Bash is limited I ask for help. I have a set of files with inp extension (e.g. name1.inp, name2.inp etc.). These are located in some folder and submitted into queue. At some point computations starts and produces output file (e.g. name1.log, name2.log etc.). Once the computation is finished the output file contains as the last like string "Normal termination". I would like to write a script that does check the status of such computations, that is prints out information if the computation started, is in progress or finished. I know how to check the finished computation (tail command), but unsure how to loop over all inp files in the folder to check if they are log files, and if these are present just to check if "Normal termination" string is present or not. If for inp file the log file is not present the script would also say that the computation is not started yet.
With many thanks in solving this simple problem.