I would like to test the software in development by running a particular script, say
script file.ext. But I was told that I an not allowed to run the script if a config file, say
file.conf, contains a particular string (not a comment with a leading #) which states the system is in production mode.
So in bash, how can I do something like
file1.conf contain a string
in production and that string is is not of the form
something ... # something in production something then execute
Or, can I somehow get an alert every time the designated file contains the string
in production, not in a comment?
I guess I need somehow use the command
inotifywait. It would be also nice to have a script that not only checks the file
file1.conf but alerts every time that some file with extension
.conf shows I'm in a production mode.