Angus Leeming <[EMAIL PROTECTED]> writes:

> > what about [ `dirname "$1"` -ef `dirname "$2"` ] ?
> 
> "test -e FOO" is a bash extension.
> Also, "dirname" does nothing more than strip everything after the final '/'
> character. "/foo/bar/../baz.cpp" and "/foo/baz.cpp" will appear to be in
> different directories.

Correct for dirname, but -ef as well as cd+pwd will use the true directory.

Also I found '-ef' documented in the man page for ksh (SunOS 5.8) and BSD test,
so I think it should be available on most platforms.

Cheers
/Andreas

Reply via email to