Skip to content

Instantly share code, notes, and snippets.

@aminamid
Created March 17, 2015 03:29
Show Gist options
  • Save aminamid/ea0c48da7e0c897fe0d7 to your computer and use it in GitHub Desktop.
Save aminamid/ea0c48da7e0c897fe0d7 to your computer and use it in GitHub Desktop.
Usage of sed, awk, grep
zcat imapserv.*.stat.gz | grep -e ' .... ms' | sed -e 's#[;/\(\)]# #g' | awk '{printf("%s %s ",$2,$6); for(i=9;i<NF;i++){printf("%s%s",$i,OFS=" ")}print $NF}' | column -t | sort -k2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment