Does Python seem appropriate for me?
Douglas Alan
nessus at mit.edu
Sun Apr 22 14:05:55 EDT 2001
Courageous <jkraska1 at san.rr.com> writes:
> >the littlest things will drive you mad. Trivial example: say you use
> > dir/s *.py
> >today to find all the .py files in the subtree rooted at the current
> >directory. You're not going to *believe* the hoops you have to jump through
> >to get that done under a Unix shell instead.
> Find all .py files in the subtree at the current directory:
> % find . -name "*.py" -print
Or, if you are using a *real* "find" (i.e., Gnu find, which is what
Linux comes with), just
% find -name "*.py"
> Find all .py files in the subtree at the current directory,
> which also contain the word "import":
> % find . -name "*.py" -exec grep import {} \; -print
This will be faster and easier to type:
% find -name "*.py" | xargs grep import
|>oug
More information about the Python-list
mailing list