X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com From: Hongyi Zhao Subject: Re: Delete a specific type of files when they exist. Date: Sat, 10 Jan 2009 18:05:00 +0800 Lines: 27 Message-ID: References: <49674D3B DOT 20008 AT byu DOT net> <496760EA DOT 10008 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Fri, 09 Jan 2009 07:36:26 -0700, Eric Blake 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/