Version 2

    This script will search for your search term and count the matches. It then writes the number of matches to a counter file.

    The next time it runs, it will read the old count number from the counter file and will compare that number to the new count number from the current test.

    If the new count is higher than the old count then it will return as DOWN.