#!/bin/ksh
#
# $Revision: 1.3 $ $Date: 2012-09-13 23:46:07-04 $
# $Source: /home/vogelke/bin/RCS/hl,v $
# $Host: sys7.com $
# $UUID: 7abfc641-8070-4582-bc50-9bcad0ce4d0a $
#
#<hl: grep with color highlighting

export PATH=/usr/local/bin:/bin:/usr/bin
export GREP_OPTIONS='--color=auto'

# Red matches (ms), green filenames (fn), blue line numbers (ln).
export GREP_COLORS='ms=01;31:mc=01;31:sl=:cx=:fn=32:ln=34:bn=32:se=36'

case "$#" in
    0) echo "$0: need a pattern"; exit 1 ;;
    *) pat="$1"; shift ;;
esac

exec egrep "$pat" $@
exit 1
