[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ -t -a -n "blabla" ]: works in bash 2.03, fails in bash 2.05
From: |
Reiter, Oliver |
Subject: |
[ -t -a -n "blabla" ]: works in bash 2.03, fails in bash 2.05 |
Date: |
Wed, 8 Oct 2003 12:28:05 +0200 |
Machine: sparc
OS: solaris2.8
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.8' -DCONF_MACHTYPE='sparc-sun-solaris2.8' -DCO
NF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I. -I. -I./include -I./
lib -I/usr/local/include -g -O2
uname output: SunOS ffzj06iu 5.8 Generic_108528-15 sun4u sparc
SUNW,Sun-Blade-100
Machine Type: sparc-sun-solaris2.8
Bash Version: 2.05
Patch Level: 0
Release Status: release
Description:
The conditional expression [ -t -a <anything true> ], e.g. [ -t -a -n
"blabla" ],
should be true when run on a terminal.
This could have to do with the following mentioned in CHANGES:
Changes between bash-2.05-beta2 and bash-2.05-beta1
1. Changes to Bash
o. Fixed a bug in `test' that caused it to occasionally return
incorrect
results when non-numeric arguments were supplied to `-t'.
Or did I just get it wrong, and -t without arguments should never have
worked ?
Repeat-By:
Type this statement from a terminal:
if [ -t -a -n "blabla" ]; then
echo 'terminal recognized'
else
echo 'terminal NOT recognized'
fi
- [ -t -a -n "blabla" ]: works in bash 2.03, fails in bash 2.05,
Reiter, Oliver <=