I'm trying to write a script that notifies me when a static web page has changed. To do it, I'm using
wget to download the web page, and
diff to check whether it has changed or not. I'm running an Ubuntu 20.04 LTS virtual machine. Here is the example:
$ wget --quiet https://twiki.di.uniroma1.it/twiki/view/Reti_Avanzate/InternetOfThings2021 -O file1
$ wget --quiet https://twiki.di.uniroma1.it/twiki/view/Reti_Avanzate/InternetOfThings2021 -O file2
$ diff -q file1 file2
Files file1 and file2 differ
As you can see,
diff reports differences between the two files. Why? Even if I try to compare them with
diff -y they look the same for me.
Looking for differences with
git diff --color-words -- file1 file2 gave the following result:
Apparently, there's a field in which the timestamp is added, and in one of the two files there's a
<!--GENERATED_HEADERS--> which is absent in the other.
Any idea on how to solve it?