i need help writing a script to check a log file and then e-mail the output to me.
so far is have this:
less /var/log/file.log | grep smbd*
ok, i want every line that starts with smbd from the file.log to be mailed to me. When i run this on the command line it works right but i'm stuck at geting it mailed to me.
how do i do that? i have to direct it somewhere right?
I want to run this as a cron job to run every hour.