summaryrefslogtreecommitdiff
path: root/scripts/vyatta-monitor
blob: 9c846b0217abb1d29a6e444cf08dbb3323ae1337 (plain)
1
2
3
4
5
6
7
#!/bin/bash
declare awkmatch="$2"
for i in "${@:3}"; do
  awkmatch+="|$i"
done
tail ---disable-inotify -f /var/log/messages \
  | awk "/$awkmatch/{ \$5=\"  $1:\"; for (f=5; f<=NF; ++f) {printf(\"%s \", \$f);}; printf(\"\n\") }"