On 15Jul2010 15:03, Roger <[email protected]> wrote: | On Fri, Jul 16, 2010 at 08:05:15AM +1000, Cameron Simpson wrote: | > for name in ~/.maildir/*; do case "$name" in */.roger) ;; *) echo "$name" ;; esac; done | > | >Which should be faster than find (no directory tree walking at all). | > | >Cheers, | > | >Every particle continues in its state of rest or uniform motion in a straight | >line except insofar as it doesn't. - Sir Arther Eddington | | The rest is interesting, yup, no subfolders here. | | It's interesting how the obvious solutions stare us blankly in the face. I | have been using echo (per wiki), but completely overlooked a "for/next" | incantation, grappling with find.
It's worth noting that the above for loop needs to use: ~/.maildir/.* because plain "*" won't match ".roger", since it starts with a dot. Cheers, -- Cameron Simpson <[email protected]> DoD#743 http://www.cskk.ezoshosting.com/cs/ A Guru is not one who simply knows all the answers. Rather, a Guru is like one who walks among the mountains, and by wandering around abit, can see the horizon through long narrow canyons.
