public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Delete a specific type of files when they exist.
Date: Fri, 09 Jan 2009 09:41:00 -0000	[thread overview]
Message-ID: <aevdm4lj7gqq2er6r42eeeoqr5mo3ok0a5@4ax.com> (raw)
In-Reply-To: <20090109054221.GA28337@ednor.casa.cgf.cx>

On Fri, 9 Jan 2009 00:42:21 -0500, Christopher Faylor
<cgf-use-the-mailinglist-please@cygwin.com> wrote:

>On Fri, Jan 09, 2009 at 11:55:46AM +0800, Hongyi Zhao wrote:
>>Hi all,
>>
>>I want to delete the all of the cache-2 files under a directory, so I
>>use the following line to do this:
>>
>>if [ -f *.cache-2 ] rm *.cache-2
>>
>>But it seems that this -f parameter in the _if_ command will not work
>>with wildcard, i.e., the  _[ -f *.cache-2 ]_ isn't a valid arg.  Any
>>hints on this issue? 
>
>Why not just
>
>  rm -f *.cache-2

A good idea.  Thanks.

-- 
.: 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/

  reply	other threads:[~2009-01-09  7:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09  4:20 Hongyi Zhao
2009-01-09  5:42 ` Yaakov (Cygwin/X)
2009-01-09  7:34   ` Hongyi Zhao
2009-01-09  9:31 ` Christopher Faylor
2009-01-09  9:41   ` Hongyi Zhao [this message]
2009-01-09 14:18 ` Eric Blake
2009-01-09 14:31   ` Hongyi Zhao
2009-01-09 15:18     ` Eric Blake
2009-01-10 11:59       ` Hongyi Zhao
2009-01-10 18:36         ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aevdm4lj7gqq2er6r42eeeoqr5mo3ok0a5@4ax.com \
    --to=hongyi.zhao@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).