#!/bin/sh

# file: $JEIDA/src/check_sphere/v1.0/src/check_sphere.sh
#
# a script that prints out a sorted list of header items
#

# grep out the desired header item by:
#  using find to generate a list of sphere files
#  grep'ing out the item
#  cutting out the third item
#  sort and count
#
find $1 -follow -name "*sphere*" -type f -exec head -c 1k {} \; | grep $2 | cut -d" " -f 3- | sort -f | uniq -c | sort -fr | cat -n

#
# end of file
