delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/06/26/19:36:41

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 459773858D32
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1687822560;
bh=L1gkZn0ASWld76bzpl/5HyBcUArIhXPYE39z1UznZBQ=;
h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=SAW3NfEJJRcTiyvNUmb19/nTF30RIVe4ajjCMwwLzqR7ITB7MaFZOU/qKWaiL+CNg
LeqbM/hMGaJRLgKBscLfDGLblBQh2V53mKfRTd+SsT80xPrDtZMNvXVuS8Gcq5HDwN
jltjUzSvcKz+rQxOygehdOIYa0hvNKayC+38I2D4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 318113858D1E
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1687822544; x=1690414544;
h=to:subject:message-id:date:from:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=+TuUiNBi7DPowNLOpBXVzths58UEzL6QNik5oGlzRGE=;
b=DGxxTo+BD/ESEs1HZqNum819mMafftYtkTJR2uU/tb5rh63+6z9cYCrr2A+pBg2xpS
tj0t0E5UOA7cqKfWXTSsjb3sgIH06QLb3Md8n9R+A71CDFTGpau3kC5ierSc5sRIVsCi
AXc9aVVYauy31VHlCSt56kq/1fu32G8X5owAWTfo0psrPud1ixzEvc8h6K29zXiAQf3v
eRxYQdWfdZ3T2j5kRaZ8C/VhLKJQs7HPBgAOXQG2fCwUXOlwJBN6fwycC7GZsaqp0tIt
zgK0mwPOIiCjX5nSIUck3CuLtrtBNqlYM5NEPi17FXTC6pW8AS0vd2k3NbmS0UAV1i89
t0pg==
X-Gm-Message-State: AC+VfDw3n1tiryHkgbJ81Y8RCrs94O7/XmTYHSxTMp1ic8lEZBeKuqE3
3eOLPOOsaDcFaGfg7rx76J1k04gxAfuJIm2/mhvI8ACiXIY=
X-Google-Smtp-Source: ACHHUZ4zu+FYmRIA1MjmQsuYAf7ZUBwg646sTtkrTxDnXzUgcJlIxnvRHNT0j6zQDuZK2buihJfTbG7i8V2Y4nft1MA=
X-Received: by 2002:a67:ff13:0:b0:443:7669:849d with SMTP id
v19-20020a67ff13000000b004437669849dmr331868vsp.21.1687822544353; Mon, 26 Jun
2023 16:35:44 -0700 (PDT)
MIME-Version: 1.0
Date: Mon, 26 Jun 2023 16:35:33 -0700
Message-ID: <CAA5t8VrR9yD3LS8AyRWD9O5J6gDbrfdbaWSUrjzwjYu30Umkiw@mail.gmail.com>
Subject: Another confusing error from someone else's Cygwin setup
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: David Karr via Cygwin <cygwin AT cygwin DOT com>
Reply-To: David Karr <davidmichaelkarr AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

I'm seeing a problem with someone else's Cygwin setup, sort of similar to a
problem I asked about a couple of weeks ago, in that it's a problem with
the same user, but seemingly a completely different problem.

He is using a Bash script that I wrote, and he gets a seemingly nonsensical
error that I don't understand.

The script starts out pretty simply, just like this:
------------------
#! /bin/bash
#set -x
main() {
if [ "$1" == "" ]; then
usage;
exit;
fi
...
-----------------

He was getting a weird error on line 3, just saying this:
---------------------
...: line 3: syntax error near unexpected token `$'{\r''
...: line 3: `main() {
---------------

This was pretty perplexing, so I asked him to uncomment the "set -x" line
to see if that provided any useful information, and that fails with a
different error:
-------------------
: invalid option...: line 2: set: -
set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
------------------

This also makes no sense to me.  I compared our "uname -a" outputs, and
they are almost identical. However, I then had him run "bash --version",
and I compared it to mine.  Ironically, I'm using an OLDER version of bash
than he is. I'm on v4.4.12(3)-release, and he's on v5.2.15(3)-release.  Is
there something in 5.x versions of Bash that could cause these issues?

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019