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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=uz8CALr31x8H16YMzCUs0ywIiA6qVzInDelaM7YR/Fi 80u1jxgO3y9CAsBMHxbkADfGI7VUlroxHcRy5tLaYO0+FxAUiOOqmjzIKzEdd+A8 D4BKB6HroTyguShhyMx8WvXFT3lnL/s8vjR/X0laZ3MeTMyCTyxZoRDcKBCHYbrM = 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=idwaN7JpfGx7WongMNCAMxil57c=; b=JG/8frOxlU81BIbOF pPWWUVALpBeIrYd1sEgqoBK8LRoG7g9BYWr1gaPs63DSMcSOacpQnlmLol0bcjeO GDpxQHfOICkCz7o9E+cqB6FHv68WFH0xfUI5b7g4/Se+3T1N68iv7Z0ItOln6Yhd LBw/qs8m68wK3T6ILG02WpfYto= 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=-1.3 required=5.0 tests=AWL,BAYES_05,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Message-ID: <51B68398.5070207@tlinx.org> Date: Mon, 10 Jun 2013 18:55:36 -0700 From: Linda Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Using 'test' fails when referencing home '~' from bash loop References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Steven Penny wrote: > 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" ] --- She can use the format she is using ... just need to stress _not_ to use the quotes... the quotes don't let "~" expansion take place. so: until test -f ~/file.txt ; do sleep 1 && echo sleep; done; echo done works just fine... -- 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