Did grep change it's syntax? I need to know...

Gilbert Sebenste sebenste at weather3.admin.niu.edu
Sun Nov 6 01:11:25 UTC 2005


Hello all,

I have a weather server which shoots out National Weather Service 
bulletins to me when they have certain keywords. For instance:

#!/bin/sh
dir=/blah/blah
/bin/cat <&0 > ${dir}$1.$$
if [ `/bin/grep -- " IL " ${dir}$1.$$ | /usr/bin/wc -l` -gt 0 ]
then
/bin/cat ${dir}$1.$$ | /bin/mail -s "ALERT: LOOK OUT!!!" user at machine.com
fi
/bin/rm -f ${dir}$1.$$

This script worked in FC1, but not FC3. I suspect a change in the grep 
command syntax. But does anyone know for sure before I try to drive myself 
nuts trying to figure this out?

*******************************************************************************
Gilbert Sebenste                                                     ********
(My opinions only!)                                                  ******
E-mail: sebenste at weather.admin.niu.edu                                  ***
*******************************************************************************




More information about the users mailing list