I want to check if a file exist, isn't empty and equal to another file. If so, do nothing.
If they aren't equal then overwrite both files with
cat "some text".
If they don't exist or are empty then also create file with
cat some text
I tried a few solutions, but whenever I get one condition right it makes another fail, or fail when no files exist.
What would be the cleanest way to solve this issue? All of this using bash?