[root@hoyt-mom ~]# cat get_compile_times.sh #!/usr/bin/env bash DATE="$1" shift for x in "$@" do egrep "Compiled catalog|Compiled static catalog" /var/log/puppetlabs/puppetserver/puppetserver.log | grep "^$DATE $x:" | awk '{print $16}' | python -c "import sys; print sum(float(l) for l in sys.stdin)" done