Gilbert Sebenste wrote:
It should hit on the first "IL". Can someone try this on
FC4 and see what
happens for you?
Works fine here, on FC4 (x86_84). Do you have LANG or LC_* set?
set | grep LANG
set | grep LC_
I understand that the ${dir}$1.$$ file is correctly created: you might
want to have commands after the /bin/mail and before the fi to append
the date, filename and file contents into a log file somewhere. That way
you can be pretty sure that everything is working until the /bin/mail.
As has been pointed out, there are more efficient ways of writing that
shell script. Even if I'd have kept the temp file, I'd probably have
gone for
file=/blah/blah/$1.$$
instead of $dir, and something like
grep -q " IL " $file && mail -s "ALERT: LOOK OUT!"
user(a)example.com < $file
Hope this helps,
James.
--
E-mail address: james | "Today Has Been Two Of Those Days."
@westexe.demon.co.uk | -- Mike Andrews