bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash behavior differs when given "set -v"


From: joerg reisenweber
Subject: bash behavior differs when given "set -v"
Date: Sun, 27 Apr 2003 04:50:37 +0200
User-agent: KMail/1.4.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux
Compiler: gcc -I/usr/src/packages/BUILD/bash-2.05
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
- -DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i386-suse-linux' 
- -DCONF_VENDOR='suse' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  
- -I. -I/usr/include -I. -I./include -I./lib -I/usr/include -O2 
- -march=i486 -mcpu=i686 -D_GNU_SOURCE -Wall -pipe
uname output: Linux andromeda 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 
2002 i686 unknown
Machine Type: i386-suse-linux

Bash Version: 2.05
Patch Level: 0
Release Status: release

Description:
       running a script throws "error" only when "set -v" is given. 
there seems to be no error, where bash thinks it is. see "log" below


Repeat-By:

get install_flash_player_6_linux.tar.gz from macromedia page (just for 
test)

when running original
root# ./flashplayer-installer
, there are some msgs caused by missing dirs on my suse8.0, -ok, bad 
script- but not the message about missing close-bracket, which you 
see down here before the "***************".

when running same script with
set -v
as first non-comment line, i get this printout (few more leading lines 
for context...):
+ '[' Xroot = Xroot ']'
+ ROOTINSTALL=1
++ uname -s
+ os=Linux
+ '[' XLinux '!=' XLinux ']'
++ uname -m
+ TEMPARCH=i686
+ ARCH=i386
++ check_glibc
+++ sed -e '2,$d'
+++ iconv --version
++ ICONV=iconv (GNU libc) 2.2.5
++ '[' 0 -ne 0 ']'
+++ echo 'iconv (GNU libc) 2.2.5'
+++ awk '{print $4}'
++ ICONVVER=2.2.5
+++ echo 2.2.5
+++ cut -d. -f1
++ GLIBCMAJOR=2
+++ echo 2.2.5
+++ cut -d. -f2
++ GLIBCMINOR=2
++ '[' '(' 2 -ge 2 ')' -a '('
./flashplayer-installer: [: missing `]'
>here it is **********************************************************
++ 2 -ge 2 ')' ']'
./flashplayer-installer: 2: command not found
++ echo invalid-glibc
+ GLIBCSTATUS=invalid-glibc
+ exit_glibc
+ echo ''

+ echo 'ERROR: Your glibc library is older than
2.2.'
ERROR: Your glibc library is older than
2.2.
+ echo '       Please update your glibc library.'
       Please update your glibc library.
+ echo ''

+ exit 1
root#


no matter how good or bad the script is coded, there is a DIFFERENCE 
in executing it, depending on "set -v" given or not (beyond echoing 
cmds ;-)
also me can't see the missing-]-error, but think there is a closing 
"]" in the right place.

jOERG
- -- 

my publickey reisenweber(AT)web.de e.g. at http://www.keyserver.net
Key fingerprint = 48FB 6DC9 89F3 223B BDD3  6C70 5102 AE36 B7E7 E173
(PGP/GnuPG publickey "checksum")
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+q0V9UQKuNrfn4XMRAmXqAJ92Z3vMGkWLhnXzH+FG9zCVyF7QOQCfeoqy
zohbdZqHnWA5AoCmDXJ5yNg=
=Aqc3
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]