X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm List-Id: 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 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 AT cs DOT umass DOT edu Subject: Re: bash string-operator problem To: cygwin AT cygwin DOT com References: <608a0fe0-a1eb-6c13-8a6e-0074dcbc166c AT mail DOT com> From: Eliot Moss 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: 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