Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: "==" operand not found Date: Wed, 23 Oct 2002 20:12:13 -0400 Message-ID: <7BFCE5F1EF28D64198522688F5449D5AD63A6D@xchangeserver2.storigen.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Scott Prive" To: "Randall R Schulz" , Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g9O0CL707060 > -----Original Message----- > From: Randall R Schulz [mailto:rrschulz AT cris DOT com] > Sent: Wednesday, October 23, 2002 7:30 PM > To: cygwin AT cygwin DOT com > Subject: Re: "==" operand not found > > > Nitin, > > You're most likely accustomed on your Linux system to > "/bin/sh" being BASH. > On Cygwinm /bin/sh is ASH, and it is far more minimal in its > implementation > of the POSIX shell standard, This makes me ask a few questions.. 1) Why is ash the default? At least on UNIX systems that use "true" sh -- usually just /bin/bash in /bin/sh compatibility mode -- I can understand THAT because plain sh is, well... "traditional". :-) Bash2 seems closer to most expectations; ash doesn't seem to add any value. 2) How would a user know they are defaulting to ash? a) The first place I would look is /etc/password for my default, which "clearly" states /bin/bash (at least for me it does). b) Next I would ls -l on /bin/whatever to see if it is a symbolic link to something else. Even on NTFS, /bin/sh or /usr/bin/sh do not appear to be links. -Scott and does not provide "==" as an > equivalent for > "=" in the "test" (a.k.a. "[") built-in. > > Randall Schulz > Mountain View, CA USA > > > At 15:22 2002-10-23, Nitin Gupta wrote: > >Hi, > >following script runs fine on linux, but not on cygwin. > Please let me know > >equivalent of "==" on cygwin. > > > >Thanks, > >Nitin > > > >#!/bin/sh > >if [ "$1" == "1" ]; then > >echo Hello World > >fi > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/