I have a bash script that should be extensible with additional functions with as little change to the script as possible.
The basic function is as follows. It loops through a list of files to check. The idea is that each check should be independent. A new check should be possible to add with the least possible change to the script as possible.
As bash is different from other programming languages, I think the way to do this is also different.
At the moment, a new check is added by creating a new script which is then added to the main script by calling it as an external command. That causes a lot of changes to the main script. As well the main script needs to accept aditional parameters to trigger the check script.
Is there any better way to do this? Any ideas?