>>    ls -alR /home/higginbo | grep "`date '+%b %_d'`" | mail higginbo
>>                             ^^^^^^^^^^^^^^^^^^^^^^^
>>This eliminates the need for a temporary file.
>
>Ah, yes, someone told me about this too, but I plan on modifying this basic
>script to handle other operations as well. I wonder if I can do a nested
>grep command like that, and what it would be useful for...

Not sure what you mean. There are two possibilities past the ls pipe:
1.
   ... | grep "`date '+%b %_d'`" | grep -v /home/higginbo/tmp | mail ...

This will filter out all files that are in your ~/tmp directory, or:
2.
   ... | egrep "`date '+%b %_d'`|^-rw-------" | mail ...

Which will filter out all files matching today's date plus any file that
happens to be read/write only by you... use egrep for its extended regexp
capabilities.

>I haven't had this much fun since I had to configure a DOS batch file to
>handle Binkleyterm and Simplex! :)

Don't know what that is, but yeah, this sort of stuff is fun. I used to
write awk scripts in batch files under DOS that produced batch files that
the initial batch file then executed... rarely under Linux do you have to go
through these hoops.

DL
--
        affairs and are crunchy Do for good in ketchup.
        meddle not of the taste with wizards, you


-- 
  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