X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.6 required=5.0 	tests=AWL,BAYES_00,J_CHICKENPOX_64,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Hongyi Zhao <hongyi.zhao@gmail.com>
Subject:  Re: Delete a specific type of files when they exist.
Date:  Sat, 10 Jan 2009 18:05:00 +0800
Lines: 27
Message-ID:  <hbsgm4hpp273kkr3nbri9k9liv5bpmhjdm@4ax.com>
References:  <rfidm4hfs5p9h6s40obf5s083onsau7j26@4ax.com> <49674D3B.20008@byu.net> <hjkem49kere1sftdo06po7adjapjqq4s48@4ax.com> <496760EA.10008@byu.net>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Fri, 09 Jan 2009 07:36:26 -0700, Eric Blake <ebb9@byu.net> wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>According to Hongyi Zhao on 1/9/2009 6:38 AM:
>> But I cann't figure this out, see the following results on my box:
>> 
>> $ echo [ -f *.cache-2 ]
>> [ -f *.cache-2 ]
>
>That means there aren't any *.cache-2 files in your directory.  Next, try
>this:
>
>$ touch a.cache-2 b.cache-2
>$ echo [ -f *.cache-2 ]
>[ -f a.cache-2 b.cache-2 ]

In your example, considering that the a.cache-2 and b.cache-2 have
been created by touch command, both the [ -f a.cache-2] and [ -f
b.cache-2 ] should have the value: true.  My issue is: how can I grab
this value, say, by using echo command?

Regards,

-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

