#!/bin/bash test_info() { cat </dev/null ; then echo "GOOD: output contains \"$pattern\"" else echo "BAD: output does not contain \"$pattern\"" exit 1 fi done <<'EOF' ===== Start of hung script debug for PID=".*", event="monitor" ===== ===== End of hung script debug for PID=".*", event="monitor" ===== pstree -p -a .*: *\`-99\\.timeout,.* /etc/ctdb/events.d/99.timeout monitor *\`-sleep,.* ---- Stack trace of interesting process [0-9]*\\[sleep\\] ---- [<[0-9a-f]*>] .*sleep+.* ---- ctdb scriptstatus monitor: ---- [0-9]* scripts were executed last monitor cycle 99\\.timeout *Status:TIMEDOUT.* *OUTPUT:sleeping for [0-9]* seconds\\.\\.\\. EOF