Mail Archives: djgpp-workers/2000/08/14/16:27:58
Hello.
I tried to build fileutils 4.0x at the weekend, but I hit a problem with
depcomp. With some help from Prashant and Eli the problem was narrowed
down to bash 2.03 (thanks guys!). This is actually a problem earlier
encountered in the djgpp-workers thread "Porting problems with Sh-utils
(beta)" - the first mail is dated Sat, 8 Apr 2000 18:49:49 +0500 on my
system.
Here is the problem: when passing parameters to a command using backticks,
the supplied environment is ignored. E.g.
a=foo ./someprog `echo hello`
will not pass $a to 'someprog'.
Here's a simple test program:
---BEGIN echo-a---
echo Args: $*
echo $a
---END echo-a---
Here's an example session showing the problem:
---START results.txt---
bash203-2.03$ ls -al
total 5
drwxr-xr-x 2 rich root 64 Aug 14 20:59 ./
drwxr-xr-x 37 rich root 2400 Mar 19 13:29 ../
-rw-r--r-- 1 rich root 24 Aug 14 21:00 echo-a
bash203-2.03$ test -f echo-a; echo $?
0
bash203-2.03$ a=foo ./echo-a
Args:
foo
bash203-2.03$ a=foo ./echo-a `test -f echo-a`
Args:
bash203-2.03$ a=foo ./echo-a `test -f ./echo-a`
Args:
bash203-2.03$ a=foo /bin/bash203.exe echo-a `test -f ./echo-a`
Args:
bash203-2.03$ a=foo /bin/bash203.exe echo-a
Args:
foo
---END results.txt---
Please note that my bash 2.03 was installed in /bin, because I have beta
5c of bash 2.04 installed. The second set of invocations is to show that
bash 2.03 is actually being using when doing './echo-a'.
Thankfully this problem does not exist in bash 2.04 beta 5c. Are there any
plans to fix this problem in bash 2.03?
Thanks, bye, Rich =]
--
Richard Dawe
[ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]
- Raw text -