X-Recipient: archive-cygwin AT delorie DOT 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 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 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: Subject: Re: Using 'test' fails when referencing home '~' from bash loop From: Steven Penny To: matt AT codespunk DOT com, cygwin AT cygwin DOT 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