[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bash clobbers variables that is shouldn't
From: |
aric |
Subject: |
Bash clobbers variables that is shouldn't |
Date: |
Thu, 12 Oct 2000 16:32:19 -0400 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -I. -I. -I./include -I./lib -I/usr/include -O2
-march=i386 -mcpu=i686
uname output: Linux radar.eng.fore.com 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT
2000 i686 unknown
Machine Type: i386-redhat-linux-gnu
Bash Version: 2.04
Patch Level: 11
Release Status: release
Description:
The Bourne shell does not define $OSTYPE. Bash does, but when invoked as
/bin/sh, bash tries to be as mush like the Bourne Shell as possible.
Therefore, when invoked as /bin/sh, bash should not clobber OSTYPE. This
goes for other variables that bash defines, too. Earlier versions of
bash did not clobber OSTYPE like 2.04 does.
Repeat-By:
% echo $OSTYPE
dont_clobber_me
% /bin/sh -c 'echo $OSTYPE'
linux-gnu
Fix:
If invoked as /bin/sh, don't clobber any environment variables
except those that the Bourne Shell does.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bash clobbers variables that is shouldn't,
aric <=