Linux (Debian) script

Job ID: 33866240

Budget: €8 – €30 EUR

I need a script that check every 30 seconds for a specific file in a folder and its subfolders, and if have been updated in (for example) last minutes, edit it by adding a line to it just before a specific tag. I need it not to add it if that line already exists. And I need the script to have a list of files that it should not update if I want it not to modify any specific file (path)
Related categories: PHP Linux Shell Script Ubuntu Debian