delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/10/05:06:58

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 <hongyi DOT zhao AT gmail DOT 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 AT 4ax DOT com> <49674D3B DOT 20008 AT byu DOT net> <hjkem49kere1sftdo06po7adjapjqq4s48 AT 4ax DOT com> <496760EA DOT 10008 AT byu DOT net>
Mime-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <ebb9 AT byu DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019