This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bash export problem



I have device=ansi.sys in my config.nt.
Using the following scripts under unix bash (GNU bash, version 1.14.6(1)
works fine e.g. in a color xterm or pcvt. 

Also using another sh.exe (Charles Forsyth's 2.0 MSDOS sh) in a DOS box
under NT 3.51 works fine.

But using bash (from gnu-win32 b17.1) results in failure.
The escape strings are not exported to the environment, i.e., they are
empty.

To reproduce, start 

bash$ ./imho

imho:

#!/usr/local/bin/bash
###!/bin/sh
in0=''  ; export in0 
in1=''  ; export in1 
sw0='' ; export sw0 
rt0='' ; export rt0 
gn0='' ; export gn0 
gb0='' ; export gb0 
bl0='' ; export bl0 
mg0='' ; export mg0 
cn0='' ; export cn0 
ws0='' ; export ws0 
sw1='' ; export sw1 
rt1='' ; export rt1 
gn1='' ; export gn1 
gb1='' ; export gb1 
bl1='' ; export bl1 
mg1='' ; export mg1 
cn1='' ; export cn1 
ws1='' ; export ws1 

./bar

and bar:
#!/usr/local/bin/bash
##!/bin/sh
            echo -n $in1$bl1'
Coose an OS'$in1$cn0'


Choices:

NT      ___________________ '$in0$cn1$sw0'   ?'$in1$cn0$bl1' Bleah
Linux   ___________________ '$in0$cn1$sw0'   0'$in1$cn0$bl1' Good
'$rt1'F'$gn1'r'$gb1'e'$bl1'eBSD ___________________ '$in0$cn1$sw0'   1'$in1$cn0$bl1' Better

Your choice:'
read answer
echo $in0$sw1
exit

As a result, the script doesn't show any colors in response to the ANSI
strings since the export fails.

(Take the script contents with a :-)


--
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]