if [ "$1" != "" ]; then format=$1 else format=mapbox fi echo "count for zoom" cat *.log | grep -e "304\|200$" | grep "\.$format" | grep -v "_healthcheck" | awk -F"/" ' { print $(NF - 2) }' | sort | uniq -c | sort -n echo "top paths" cat *.log | grep -e "304\|200$" | grep "\.$format" | grep -v "_healthcheck" | awk '{ print $(NF -1) }' | sort | uniq -c | sort -n | tail -n 20