Are general linux questions off-topic here? I'm trying to automate some
tasks, one of which is detailed below:

With the following commands in a shell script, I want to search for files
that have been modified on the current date and have the output mailed to
me, probably will run this as a cron job, I have that covered though.

date +'"%b %-d"'>file.txt

date string above dumps this to file.txt: "Apr  8"

ls -laR /home/higginbo | grep -ffile.txt | mail higginbo

grep should be reading standard input from the ls command, using the string
in file.txt as an argument, and then mailing the results to me. I get
nothing. I think the problem is with the syntax I am using with grep.
Anyone see anything wrong?

ls -laR /home/higginbo | grep "Apr  8" | mail higginbo

This works great, but I have to change and run the command by hand when I
want to check the results.

I'm sure it is something really simple I am missing, but what? Or maybe
even an easier way to do it perhaps???


_________________________________________________________
- john higginbotham - [EMAIL PROTECTED] - webmeister -
- http://www.pntprinting.com - work                     -
- http://limbo.netpath.net - experimental (renovating)  -



-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to