#!/usr/app/TurboShell/bin/bash
# Every command ends with a code: 0 is fine, anything else is not
grep -q ERROR nas.log
echo "grep ERROR: $?"
grep -q DEBUG nas.log
echo "grep DEBUG: $?"

grep -q ERROR nas.log && echo "the log has errors"
grep -q DEBUG nas.log || echo "the log has no DEBUG lines"
exit 3
