#! /usr/bin/env bash # # Replace unpredictable "zeekctl update" output with a constant string. awk '{ if ( $1 != "updating" ) { if ( $0 ~ /sent [0-9][0-9]* ID/ || $0 ~ /processing suspended/ ) { $0 = $1 " (SOMETHING)" } } print }'