Skip to content

Instantly share code, notes, and snippets.

@josy1024
Created February 12, 2016 19:01
Show Gist options
  • Save josy1024/c71ec37d2172060a9364 to your computer and use it in GitHub Desktop.
Save josy1024/c71ec37d2172060a9364 to your computer and use it in GitHub Desktop.
relaxed log analyse from logfiles
#!/bin/bash
# nach_fehlern_suchen.sh logfile
if cat $1 | grep "Fehler" ; then
gstatslog ERROR_DONE "$code $logfile"
elif cat $1 | grep "Error" ; then
gstatslog ERROR_DONE "$code $logfile"
elif cat $1 | grep "Warnung" ; then
gstatslog WARN_DONE "$code $logfile"
else
gstatslog OK_DONE $code
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment