The documentation is clear, if you don't just skim parts of it. "-f $path" calls stat(). "-l $path" calls lstat(). So, "-f $path" will be true for a link to a file.
If you want -f to be false for a symlink, then you do "-f _" preceded by something that calls lstat(); that is, either "-l $path" or "lstat $path".
- tye
In reply to Re: Should -f test return true for symlinks ? (lstat)
by tye
in thread Should -f test return true for symlinks ? [RESOLVED]
by Bloodnok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |