X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:date:message-id:subject:from:to
	:content-type; q=dns; s=default; b=ly1Tm6uGeeX52pDuipIoYWVUQyTI4
	JF8vOI4fkj2XN4QhFw7ufoOMDfWXbp1ojFvhFgKLmJMhjMCG/R7VQAOEw4EqbHaH
	F1eMFeTbO7Xi61EQpnArQT6dASyx9AlF91JYz6h/gLiGaCJkMh9yY8sCdxh5IEjU
	6Htgb1oHYE6n/o=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:date:message-id:subject:from:to
	:content-type; s=default; bh=0qbkQvLpj527xpdBI2N2Z2eOd6Q=; b=m2T
	y4bQE/rYPv/9fJujeZ9CUhrNbWHs12GJcKCE7X4AwGzo5nOGCqlG2c6w90f+j+GR
	kYyFa6DB9+K6tdULHnN07YGWipBWK4dmmWj9aVxXPqWF7qJnvdqEOFvEW3gnP12T
	meDl8TAROV+Fa6n3079Trzf9f7d+AxDaZp7tOtWQ=
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
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1
MIME-Version: 1.0
X-Received: by 10.68.164.226 with SMTP id yt2mr12088879pbb.203.1370911926463; Mon, 10 Jun 2013 17:52:06 -0700 (PDT)
Date: Mon, 10 Jun 2013 19:52:06 -0500
Message-ID: <CAAXzdLWRMMUN=ati=6Z75CnEwTxy2VvmAON_DZwtQimJPFSroQ@mail.gmail.com>
Subject: Re: Using 'test' fails when referencing home '~' from bash loop
From: Steven Penny <svnpenn@gmail.com>
To: matt@codespunk.com, cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1

From: "Matt D."
> The following never exits the loop:
> until test -f "~/file.txt"; do sleep 1 && echo sleep; done; echo done

This is not an error, or even Cygwin related. With Bash you must now quote "~"
if you want it to expand.

Do this

  [ -f ~/file.txt ]

or this

  [ -f ~'/file.txt' ]

or this

  [ -f "$HOME/file.txt" ]

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

