Re: Finding shallowest instance of $foo in a given structure

2008-03-20 Thread James Youngman
On Thu, Mar 20, 2008 at 4:59 AM, RB <[EMAIL PROTECTED]> wrote: > I'm assuming the Texinfo page would need to be a little more > explanatory and should stylistically fit with section 8 or 9; is that > the case? Yes. I'd be rather in favour of 9, "Worked Examples". > > Following is a patch ag

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread RB
> Would the two of you be able to be able to pull this into a > (what-I-wanted-to-achieve, command, explanation-of-how-it-works) form > so that we can put it into the Texinfo documenation? (And, length > permitting, the manual page). Since I was already familiar with manual page syntax and a

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread Bob Proulx
RB wrote: > > Would the two of you be able to be able to pull this into a > > (what-I-wanted-to-achieve, command, explanation-of-how-it-works) form > > so that we can put it into the Texinfo documenation? (And, length > > permitting, the manual page). > > Never done a Texinfo doc, but no bet

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread James Youngman
On Wed, Mar 19, 2008 at 8:48 PM, RB <[EMAIL PROTECTED]> wrote: > > Would the two of you be able to be able to pull this into a > > (what-I-wanted-to-achieve, command, explanation-of-how-it-works) form > > so that we can put it into the Texinfo documenation? (And, length > > permitting, the

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread RB
> Would the two of you be able to be able to pull this into a > (what-I-wanted-to-achieve, command, explanation-of-how-it-works) form > so that we can put it into the Texinfo documenation? (And, length > permitting, the manual page). Never done a Texinfo doc, but no better time to learn than

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread James Youngman
I also think this is an interesting example. The documentation needs a few more good examples. Would the two of you be able to be able to pull this into a (what-I-wanted-to-achieve, command, explanation-of-how-it-works) form so that we can put it into the Texinfo documenation? (And, length perm

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread Bob Proulx
RB wrote: > > Using the above test case the following seems to work. > > > > find srcdir \( -exec test -d {}/CVS \; -o -exec test -d {}/.svn \; -o > > -exec test -d {}/.git \; \) -print -prune | sort > > That works for me as well; I knew I had to be a few sandwiches short! > It also has the add

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread RB
> Is that right? That is correct, but having failed to apply basic shortcut logic with parentheses and '-o', my search was painfully slow when testing due to using only a single subtype (hint: follow your own requirements). Hence, I presumed early on that -exec was the wrong way to go and chased o

Re: Finding shallowest instance of $foo in a given structure

2008-03-18 Thread Bob Proulx
RB wrote: > In short, I'm looking for a clean way to find the shallowest 'CVS', > '.svn', or what have you in a given directory structure without > ignoring sibling directories. If a project publishes multiple trees > (trunk, branch, etc.) with no common VCS parent, it's difficult to > cleanly cat

Finding shallowest instance of $foo in a given structure

2008-03-18 Thread RB
I've presented myself with an interesting (to me) problem that I can't seem to address with find; an alternative would be a trivially short script, but I'm being stubborn for the moment. I'll try to make this short. In tracking multiple OSS projects, I've collected a src/ directory full of variou