[Top][All Lists]

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

Re: How to conditionally search?

From: Peng Yu
Subject: Re: How to conditionally search?
Date: Fri, 27 Nov 2009 09:38:07 -0600

On Fri, Nov 27, 2009 at 6:19 AM, James Youngman <address@hidden> wrote:
> On Wed, Nov 25, 2009 at 3:56 AM, Peng Yu <address@hidden> wrote:
>> I want to search for all '.py' files in a directory (recursively).
>> However, if there is a '.sh' file in the same directory where a '.py'
>> is in, the '.sh' file rather than the '.py' file will be returned.
>> Would somebody let me know how to do so?
> Does ...
> find . -name '*.sh' -o -name '*.py'
> ... do what you had in mind?

No. This is not what I want. This will give me all the .sh and .py
files. But if there is a .py file and a .sh file with the same suffix
in the same directory, I only want to show the .py file but not the
.sh file.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]