| delorie.com/archives/browse.cgi | search | 
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm | 
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> | 
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> | 
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> | 
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> | 
| Sender: | cygwin-owner AT sources DOT redhat DOT com | 
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com | 
| Message-ID: | <849D30D91B33D41181EB00B0D020AA8C34B724@mail.hq.bowstreet.com> | 
| From: | Becky Purdie <bpurdie AT bowstreet DOT com> | 
| To: | "'cygwin'" <cygwin AT sources DOT redhat DOT com>, | 
| Becky Purdie | |
| <bpurdie AT bowstreet DOT com> | |
| Cc: | "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com> | 
| Subject: | Cygwin Bash shell | 
| Date: | Mon, 7 Aug 2000 14:17:26 -0400 | 
| MIME-Version: | 1.0 | 
| X-Mailer: | Internet Mail Service (5.5.2650.21) | 
I think I've found a possible bug with the new version of cygwin bash shell. What I'm trying to do is compare a variable in an 'if' statement. It works correctly using the bash shell installed on my Solaris box but not correctly on Windows using GNU bash. I'm using version 2.04.0(1)-release (i586-pc-cygwin0). Please let me know if this is a known bug and if there is a "fix" for this problem....Thanks! Here is the code: echo $PLAT if [ "$PLAT" = "SunOS" ]; then PerfTree=/perf echo $PerfTree BowHome=/bowstreet echo $BowHome BinDir=$PerfTree/SolarisBin elif [ "$PLAT" = "CYGWIN_NT-4.0" ]; then PerfTree=//z/performance echo $PerfTree BowHome=//c/bowstreet echo $BowHome BinDir=$PerfTree/NT4Bin else echo "Unable to assign variables!" fi The output indicates that the $PLAT variable is not recognized within the square brackets [ ]'s. Here's the output (in bash -x mode): SunOS = SunOS ']' =CYGWIN_NT-4.0 ']' Unable to assign variables! BUT when I run it on my Solaris Box, it runs fine and assigns the variables correctly! -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |