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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx < $file

Hope this helps,

James.
-- 
E-mail address: james | "Today Has Been Two Of Those Days."
@westexe.demon.co.uk  |     -- Mike Andrews


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux