[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`test -R' not working
From: |
NBaH |
Subject: |
`test -R' not working |
Date: |
Fri, 28 Feb 2014 22:50:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Rompilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/home/nbah/share/locale'
-DPACKAGE='bash'
+-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2
uname output: Linux diocletien 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2
x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu
Bash Version: 4.3
Patch Level: 0
Release Status: release
Description:
$ var="foo bar"
$ declare -n nameref=var
$ echo "${!nameref} = $nameref"
var = foo bar
$ test -R nameref && echo ok || echo ko
bash: test: -R: unary operator expected
ko
Repeat-By:
$ test -R "nameref" && echo ok || echo ko
bash: test: -R: unary operator expected
ko
I hope I don't miss anything.
TIA
- `test -R' not working,
NBaH <=