Maciek Olczak <address@hidden> writes:
> #Â echo ~${file}~
> ~~
> #Â [ -d ${file} ]; echo $?
> 0
POSIX requires this behavior. POSIX says that the shell command
`[ "FOO" ]' exits true (status 0) if "FOO" is not null, false (status
1) otherwise. In this case "FOO" is "-d", which is not null, so
`[ -d ]' must exit true (status 0).
See:
<http://www.opengroup.org/onlinepubs/007904975/utilities/test.html>