
Show HN: Mail me when the output of a command changes - zwischenzug
https://github.com/ianmiell/alert-on-change/blob/master/README.md
======
aexaey
That is way over-engineered for something that could be done with a 10 lines
of bash:

    
    
        diff2mail() {
            a=$($@)
            while true; do
                b=$($@)
                if [ "$a" != "$b" ]; then
                    echo "$a -> $b" | mail -s "$@ changed" 'root@example.com'
                    return
                fi
                sleep 1
            done
        }
    
        diff2mail ls /tmp
    

And for a lot of stuff it's even shorter than that:

    
    
        make && x="is done" || x="has failed"; echo "build $x" | mail root

~~~
zwischenzug
Did you actually read the README?

~~~
aexaey
Yes; together with the actual code, weird concept of "COMMON WORDS THRESHOLD
PERCENT" (original author's capitalization), and a cursory look across
imported library by the same author and its scant documentation.

Is there something in particular, apart from generous amounts of gratuitous
complexity, that you would like to point reader's attention at?

