#!/bin/sh if [ ! -f $1 ]; then echo "file not found." exit 1 fi LOG=$1 cat $LOG | grep " @in " | awk '{print $5}' | sort | uniq -c | sort -r exit 0