X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:reply-to:subject:to:references:from:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=i3oBewrrj86CIP+y
	YtGnMqfmfrfd8cYZoTOBQ9vGq0YmoyfKmYJ3Z7FIIxdOKzS3XChEsvKcmTmiSoh7
	D73P+0TD7vBQSK04wewNwzi1tGRUhNmx7YmOxdJ0HazLnAE0nJ8KLf21jLe/w6tb
	CpX5Nqe6mg+r4/Q6G4arIdbv7kM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:reply-to:subject:to:references:from:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=cipJQbu722OYeAwSb5L9ZB
	X1WUc=; b=DGwKkrM+4BS++F7qMo1NgxXxfknsD8rSbVOC4X0p/JLRZJZARQRZGo
	VilEJ/92k+8uTk7HiUcLxl3QPt8fEMoueto/vmvO4rFD6CGg24s+8ilUhZN1gUS7
	vPrjIdYQYd6n33YbXl+Bpx/f9cWAYNNTI2XaJyIyY7xiAfPIXHaPU=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=eliot, Moss, moss, H*Ad:D*edu
X-HELO: mailsrv.cs.umass.edu
Reply-To: moss@cs.umass.edu
Subject: Re: bash string-operator problem
To: cygwin@cygwin.com
References: <d846545ebaa5469d90f01f84e4f48c3d@vsrv060ex01.ssd.fsi.com> <CAD8GWsvqXdG-2YvmVAqW=jkZ_ejHGOj=LCemjoqkF08Vy7i=Fw@mail.gmail.com> <608a0fe0-a1eb-6c13-8a6e-0074dcbc166c@mail.com> <CAD8GWsvUBHrbTNxE1RA1gtUhXCD3tD6BgUuPBX_DWJDwHOafDg@mail.gmail.com>
From: Eliot Moss <moss@cs.umass.edu>
Message-ID: <0c5cbf74-f9a3-2caf-d32d-46558ece3362@cs.umass.edu>
Date: Thu, 21 Feb 2019 16:46:52 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
MIME-Version: 1.0
In-Reply-To: <CAD8GWsvUBHrbTNxE1RA1gtUhXCD3tD6BgUuPBX_DWJDwHOafDg@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

On 2/21/2019 3:17 PM, Lee wrote:
> On 2/21/19, john doe wrote:
>> On 2/21/2019 5:18 PM, Lee wrote:
>>> On 2/21/19, Rockefeller, Harry  wrote:
>>>> CYGWIN_NT-6.1 HARRYR-PC 3.0.0(0.336/5/3) 2019-02-16 13:21 x86_64 Cygwin

> $ cat /tmp/x
> #!/bin/bash
> A="A"
> B="A"
> if [ $A == $B ]; then
>      echo  "identical"
> fi
> if [ $A = $B ]; then
>      echo  "identical"
> fi
> 
> $ bash /tmp/x
> identical
> identical

My reading of the bash man page says that = and == in this usage
do the same thing.  However, = is Posix compliant, while (presumably)
== is not ...   Eliot Moss

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

