Date: Wed, 22 Apr 2009 13:14:07 -0700 From: Bill Campbell <freebsd@celestial.com> To: freebsd-questions@freebsd.org Subject: Re: awk question (actively tail a file & notify when expression is found) Message-ID: <20090422201407.GA9323@ayn.mi.celestial.com> In-Reply-To: <6fbcd0710904221238r1cb63d41qaa331beb683ffa95@mail.gmail.com> References: <6fbcd0710904221238r1cb63d41qaa331beb683ffa95@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
You might want to look at ``swatch'' which is designed to do this, and monitors multiple log files simultaneously. On Wed, Apr 22, 2009, Evuraan::???????????????????????? wrote: >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@email.address")}' > >but this below, does not work > > tail -f /var/log/apache2/access.log |awk ' /192.168.1.100/ { print >$0 | "mail me@email.address "}' > >Any pointers would be much appreciated. > >Thx. >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > -- Bill -- INTERNET: bill@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792 Capitalism works primarily because most of the ways that a company can be scum end up being extremely bad for business when there's working competition. -rra
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090422201407.GA9323>