On Thu, Jul 15, 2010 at 08:06:17AM +0200, David Haguenauer wrote:
>Hi,
>
>* [email protected] <[email protected]>, 2010-07-14 21:01:01 Wed:
>> How can I exclude one folder from my mailbox list using a find
>> pipe?
>> 
>> muttrc:
>> mailboxes `find ~/.maildir/ -type d -name cur -printf '%h '`
>> 
>> [...] To clarify, I only want to omit my
>> "/home/roger/.maildir/.roger" folder and not my other folders such
>> as "/home/roger/.maildir/[email protected]" folder(s).
>
>I'd use grep; something like the following:
>
>    find ~/.maildir/ -type d -name cur -printf '%h ' | grep -v '\.roger/'
>
>(Adapt the regexp depending on how strict you need to be.)

I just tried both of these, and they don't filter using the grep -v.


If I'm not mistaken, find within the above incantation, finds every dir with a
subfolder named "cur", as such, the "grep -v" filter is simply ignored ...
because find already passed every folder on one line instead of multiple lines
with a newline at the end of each folder.

I was initially thinking of a sed/awk incantation.

(You can test the above on your own listing of maildir folders, too.)

-- 
Roger
http://rogerx.freeshell.org/

Reply via email to