From: kuku@gilberto.physik.rwth-aachen.de (Christoph Kukulies)
Subject: bash export problem
6 Mar 1997 11:56:28 -0800
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199703060952.KAA08349.cygnus.gnu-win32@gilberto.physik.rwth-aachen.de>
Original-To: gnu-win32@cygnus.com
Original-Sender: owner-gnu-win32@cygnus.com


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='[0m'  ; export in0 
in1='[1m'  ; export in1 
sw0='[30m' ; export sw0 
rt0='[31m' ; export rt0 
gn0='[32m' ; export gn0 
gb0='[33m' ; export gb0 
bl0='[34m' ; export bl0 
mg0='[35m' ; export mg0 
cn0='[36m' ; export cn0 
ws0='[37m' ; export ws0 
sw1='[40m' ; export sw1 
rt1='[41m' ; export rt1 
gn1='[42m' ; export gn1 
gb1='[43m' ; export gb1 
bl1='[44m' ; export bl1 
mg1='[45m' ; export mg1 
cn1='[46m' ; export cn1 
ws1='[47m' ; 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".
