[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



The task is: starting at the current directory, visit every directory
in the subtree and run "etags" on every .c|.cc|.cpp|.h|.hpp file in
each directory, leaving the resulting TAGS file in the directory
containing the source files. I've tried the obvious

 find . -type d -exec ( pushd {} ; etags *.c ; popd ) ;

but that fails due to syntax errors on the parens. Escaping the parens
leads to different syntax errors.

I *can* do 

 etags `find . ( -name "*.c" -o -name "*.cc" -o -name "*.cpp" ) -print`

But then the TAGS file gets created at the root of the tree I'm
looking at, which isn't what I want. The structure of what I want to
do is simple: visit each directory, make it current, and run a command
(which may need to use shell characters). But how to actually feed
that command to "find" is not obvious to me.

Yeah, I could read the bash man page for the Nth time, but I'm hoping
someone here can answer the question more quickly from personal
knowledge :-)

Thanks,

-- Joe

-- 
Resist the feed.
--
If you really want to get my attention, send mail to
jknapka .at. kneuro .dot. net.


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00567" href="msg00567.html">[ale] I need a bash clue.</a></strong>
<ul><li><em>From:</em> jkinney at localnetsolutions.com (James P. Kinney III)</li></ul></li>
<li><strong><a name="00572" href="msg00572.html">[ale] I need a bash clue.</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00565.html">[ale] Re: [unemployed] Short Term Charlotte Contract</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00567.html">[ale] I need a bash clue.</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00565.html">[ale] Re: [unemployed] Short Term Charlotte Contract</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00567.html">[ale] I need a bash clue.</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00566"><strong>Date</strong></a></li>
<li><a href="threads.html#00566"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>