awk question (actively tail a file & notify when expression is found)

Evuraan::ഏവൂരാന്‍ evuraan at gmail.com
Wed Apr 22 20:07:23 UTC 2009


Greetings..!

this works,

tail -f /var/log/apache2/access.log | nawk '/192.168.1.100/{ print $0 }'

and this too:

 tail -f /var/log/apache2/access.log |awk ' /192.168.1.100/ { system
("mail -s \"This works\" me at email.address")}'

but this below, does not work

 tail -f /var/log/apache2/access.log |awk ' /192.168.1.100/ {  print
$0 | "mail me at email.address  "}'

Any pointers would be much appreciated.

Thx.


More information about the freebsd-questions mailing list