* Ken Weinert <kweinert@gmail.com> [2005-02-23 14:45 +0100]:
> Shows what happens when you learn something and don't keep up with
> command changes. I would have written that command as:
>
> find ~/Maildir -type f -exec fgrep -i ledoux {} /dev/null \;
>
> which also shows the filename since you've fooled grep into thinking
> it's searching >1 file :)
You know, it's things like that started my habit of perusing the man
page before composing a command. I found myself struggling over getting
a command to do just what I wanted in a way I thought I remembered, and
then found out there was a new option... ;]
Anyway, while dinking around I found a regex to leave only the filename,
so here's the complete command:
find Maildir/ -type f -exec grep -iH ledoux {} \; | \
sed 's/^\([^,]*,[^:]*\):.*$/\1/'
Regards,
-- dave [ please don't CC me ] --------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.Received on Wed Feb 23 06:04:50 2005
This archive was generated by hypermail 2.1.8 : Wed Feb 23 2005 - 06:04:50 AKST