Skip to content

Instantly share code, notes, and snippets.

@therealkevinard
Created October 22, 2016 14:17
Show Gist options
  • Save therealkevinard/806739255d3784ba720e1645faadb8a1 to your computer and use it in GitHub Desktop.
Save therealkevinard/806739255d3784ba720e1645faadb8a1 to your computer and use it in GitHub Desktop.
Dead-simple awk log file for regex match, and write new file with results. Probably doesn't deserve a gist, but I like gisting.
#!/usr/bin/env bash
# example: awk a clamav logfile (clamout.log) and write new file(awklog.txt) of lines that have "Empty file"[case-sensitive] in them
awk '/Empty file/{ print $0 }' clamout.log.txt > awklog.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment