Using 'test' fails when referencing home '~' from bash loop

Matt D. matt@codespunk.com
Tue Jun 11 00:13:00 GMT 2013


The following never exits the loop:

until test -f "~/file.txt"; do sleep 1 && echo sleep; done; echo done

The following does:

until test -f "/cygdrive/d/cygwin-home/file.txt"; do sleep 1 && echo 
sleep; done; echo done

HOME is set and confirmed:
echo $HOME
/cygdrive/d/cygwin-home

--
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



More information about the Cygwin mailing list