Re: Does [ -f FILE ] have a bug on testing a symlink ?

2015-02-09 Thread Cheng Rk
On Monday, February 9, 2015 3:13 PM, Andreas Schwab wrote: Cheng Rk writes: >> Then the builtin test help need a documentation fix, right? You're addressing different lines but I am saying this line is inaccurate, right? -f FILETrue if file exists and is a regular

Re: Does [ -f FILE ] have a bug on testing a symlink ?

2015-02-09 Thread Cheng Rk
On Monday, February 9, 2015 1:59 PM, Andreas Schwab wrote: >> According this documentation `help test`, I am expecting it should return >> false on anything other than a regular file, >> >> -f FILETrue if file exists and is a regular file. >> >> >> but why it returned true on a symlink

Does [ -f FILE ] have a bug on testing a symlink ?

2015-02-09 Thread Cheng Rk
To bug-bash@gnu.org: According this documentation `help test`, I am expecting it should return false on anything other than a regular file, -f FILETrue if file exists and is a regular file. but why it returned true on a symlink to a regular file? $ [ -f tmp/sym-link ] && echo true