From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) by sourceware.org (Postfix) with ESMTPS id 318113858D1E for ; Mon, 26 Jun 2023 23:35:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 318113858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vs1-xe30.google.com with SMTP id ada2fe7eead31-440ad576d87so1114484137.1 for ; Mon, 26 Jun 2023 16:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687822544; x=1690414544; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=+TuUiNBi7DPowNLOpBXVzths58UEzL6QNik5oGlzRGE=; b=NSpSx2aoBJAz7NX2Z/XL1fEF7lQQji1jXWnNrQnshFwSe//gb/nyZ/sWPQNdaW+LRY S5jrW6s6Nxjg1CXAGUTccufOkRsfrmqVH3oayZWnNqXx02cPUW3tzzTRzkTx0zyw7jqs UVT2qliCsu6gIfPN0dr7i6+VQf9hls0Y5ImOrUFYkd3U84rOJl1aCou/ySAKdJ8w241j XcJxsARuHvBcRqd1NsdR40ybMRK4GFh+WR/JliU2h6QytLu/BiUWBlC5vqGQVd3/yVQR XswuBIwcOPmRV+4q2xZ2xodxRktlkOjHBcPdgEbEyl2/3UljoEl7LHMTZj/pLHEaaPYW suLg== 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 From: David Karr Date: Mon, 26 Jun 2023 16:35:33 -0700 Message-ID: Subject: Another confusing error from someone else's Cygwin setup To: The Cygwin Mailing List Content-Type: multipart/alternative; boundary="000000000000333d2e05ff10cfc9" 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 List-Id: --000000000000333d2e05ff10cfc9 Content-Type: text/plain; charset="UTF-8" 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? --000000000000333d2e05ff10cfc9--