I have a Debian server which runs a service using multiple config files (in a similar way to apache2) which I need to add an expiration date to. The config file that has an expiration date starts with a comment containing the it:#dd.mm.yyyyThe problem is that not all files need to have an expiration date. These don't have this comment.I need to write a bash script that'll be regularly run by cron, which would parse the first line in every config file, and if it's expired, it'd perform an action in this file (e.g. move to another folder) and then reload or restard the service in question. Files without the expiration date comment have to be ignored (no actions need to be performed on these).How to reliably verify the expiration of the file?
How to implement config file expiration time?
text processing;files;scripting;date