Array variables still seen by test -v as unset even after assignment

2016-07-26 Thread dtr
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/s

Re: bug in [ -f file ] test

2016-07-26 Thread Grisha Levit
Are you sure "file" is a link to an actual file, not, say, a directory? $ rpm -q bash; echo $BASH_VERSION; cat /etc/redhat-release bash-4.3.42-3.fc23.x86_64 4.3.42(1)-release Fedora release 23 (Twenty Three) $ touch file; ln -s file link; [[ -f link ]]; echo $? 0 On Tue, Jul 26, 2016 at 12:58 PM

Re: bug in [ -f file ] test

2016-07-26 Thread László Házy
Hmm, interesting. I can reproduce your results. Thanks. However, note the following: [user1]$ chmod g+rx /home/user1 [user1]$ touch file; ls -l file -rw-r--r--. 1 user1 users0 Jul 26 15:24 file [user1]$ su user2 -c "ln -s /home/user1/file /var/tmp/link" [user1]$ ls -l /var/tmp/link lrwxrwxrwx.

Re: bug in [ -f file ] test

2016-07-26 Thread Reuti
Am 26.07.2016 um 23:07 schrieb László Házy: > Hmm, interesting. I can reproduce your results. Thanks. > However, note the following: > > [user1]$ chmod g+rx /home/user1 > [user1]$ touch file; ls -l file > -rw-r--r--. 1 user1 users0 Jul 26 15:24 file > > [user1]$ su user2 -c "ln -s /home/use

Re: Array variables still seen by test -v as unset even after assignment

2016-07-26 Thread Pierre Gaston
On Tue, Jul 26, 2016 at 8:29 PM, wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: x86_64-pc-linux-gnu-gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-

Re: Array variables still seen by test -v as unset even after assignment

2016-07-26 Thread Eduardo A . Bustamante López
On Wed, Jul 27, 2016 at 09:06:50AM +0300, Pierre Gaston wrote: [...] > > Description: > > Unlike usual variables, that have been assigned an empty value, > > arrays are treated by test -v as if they weren’t assigned anything. [...] > > This has been reported and discussed several times. > b