Skip to content

Instantly share code, notes, and snippets.

@nirmaayan
Created January 16, 2019 10:43
Show Gist options
  • Save nirmaayan/224de49871d33b4268671beb45b76bd5 to your computer and use it in GitHub Desktop.
Save nirmaayan/224de49871d33b4268671beb45b76bd5 to your computer and use it in GitHub Desktop.
rlogger.info("repair {} completed successfully", id);
rlogger.info("repair {} failed: {}", id, eptr);
rlogger.info("repair {} failed", id);
@nirmaayan
Copy link
Author

collect the info between dates from file and keyword repair
egrep "Jan 12|Jan 13" test.log | grep "repair - " | grep "failed" | awk '{split($0, a); print a[6]" "a[7]" failed"}' | sort | uniq
egrep "Jan 12|Jan 13" test.log | grep "repair - " | grep "completed successfully" | awk '{split($0, a); print a[6]" " a[7]" succeeded"}' | sort | uniq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment