On 30Jan2007 09:08, Daniel Qarras dqarras@yahoo.com wrote: | PS. A hard headed zsh user would continue to complain that there's no | way to differ between files and links in bash without find but I won't | go into that :)
A POSIX shell requires that the test command supports this:
-h file True if file exists and is a symbolic link. -L file True if file exists and is a symbolic link.
There are two letters for historic reasons. Bash supports both, and so does zsh.
Of course, if you mean a hardlink, then you're asking a question that is meaningless.
BTW, I tend to test directorishness like this:
[ -d foo/. ]
which works for a directory or a symlink that resolves to a directory.