mercredi 24 juillet 2019

How to make a script of diff where if no difference it will tell me "nothing changed" and if there is any difference it will send me the output?

So here i'm using telegram-send. So the script will send me a message when it ran.

diff /path/to/file/test.log /path/to/file/test2.log

So anyone can help me to use if statement? It will be look like these

if (the command create output) telegram-send --file test2.log

if (nothing change) telegram-send "nothing changed"

Aucun commentaire:

Enregistrer un commentaire