A local friend found the problem. Here is the complete working command line:
date +'%b %_d'>file.txt
(no double-quotes needed; grep takes content as literal
ls -laR /home/higginbo | grep -f file.txt | mail higginbo
If I had run grep in verbose mode, I would know that it was actually
searching for ""Apr 8"" before, and not just "Apr 8".
Anyway, it works just fine. The find command may be simple, but I've never
used grep with an input file or mailed any output to myself, or run the
date command for anything else besides setting the clock. I learned more
this way.
I'll have to try that thing with cat though. Looks interesting...
At 11:49 AM 4/9/98 +0200, [EMAIL PROTECTED] wrote:
>Hold it right there. You don't even need grep; what you need is the find(1)
>command. This command is a generalised filesystem tranverser, holder of the
>most bizarre syntax in the Unix menagerie. But's it's also damned useful
>once mastered.
>
> find / -mtime 1 -print
>>date +'"%b %-d"'>file.txt
>>
>>date string above dumps this to file.txt: "Apr 8"
>>
>>ls -laR /home/higginbo | grep -ffile.txt | mail higginbo
>
>This won't work at all, although for future reference:
>
> ls -laR /home/higginbo | grep `cat ffile.txt` | mail higginbo
>
>will do what you want. This is referred to as backticking. Consider it as a
>macro substitution on grep's command line that involves running another
>process.
--
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.