From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward500b.mail.yandex.net (forward500b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d500]) by sourceware.org (Postfix) with ESMTPS id A555C3858C78 for ; Mon, 6 Nov 2023 17:30:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A555C3858C78 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A555C3858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a02:6b8:c02:900:1:45:d181:d500 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699291851; cv=none; b=fNJyMvfo08L1SYAB4PIoffAhH0/mhgHXHEGFNdaw35FM/qxGvT2Mvzp52TxsrOGupNB02vY1UzLsDXjMUWoKk03twbgavCszPsIT5Vfzw1lZwN8ObRAvkz/kyS3KWxVXyWXQ68l6QmMjwmbPjt4Z9unyZoPO1x6rplkbr9/z6Io= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699291851; c=relaxed/simple; bh=6jyFKtUxK++4/farffTptKlDcGCu/kgbl+YkL/atXv4=; h=DKIM-Signature:Date:From:Message-ID:To:Subject:MIME-Version; b=YIXRpE+BvZJh/PemycJfrp8oVOtJebj5uma7ZiSU3h3pFYgJQ/bPZ5FVYFfUTj11cbbsDT+wEiS8RChgN003veIJtjbbi+Qy8FrwN12yWRXydEM5jqaCcKCYLPRwM1tUK/nCMQ2xPX4X6HlfcdNP/iuHhk8LrduRhsBWcHxhuMM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:5da3:0:640:8139:0]) by forward500b.mail.yandex.net (Yandex) with ESMTP id 4BE3A60B6F; Mon, 6 Nov 2023 20:30:49 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id MUfEATTWlmI0-d5HM0oZC; Mon, 06 Nov 2023 20:30:48 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1699291849; bh=OBTLMbzfr50lHP+ho0H/Woun7JMmXhP+THx74mf3H84=; h=In-Reply-To:Subject:Date:References:To:Message-ID:Reply-To:From; b=VOBMQoOEfqJ0tRUgloIli2CWkjwqq2EMlqyek8xtJY7iRsIkz7k6vYWa4n8la/eWC G8wH5UpHChvUrNPlEdT5dQ4Ig2far1/PdHumDaUVKqEbRz4wH4CLmrnT5WH9XFIamf eVVqmvDhkRy+b7f1ajLS4Frne8aOE+VPBiHiGOSM= Authentication-Results: mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Wed, 05 Jul 2023 19:25:29 -0000 Date: Wed, 5 Jul 2023 22:25:23 +0300 From: Andrey Repin X-Mailer: The Bat! (v9.3.4) Professional Reply-To: cygwin@cygwin.com Message-ID: <1417059262.20230705222523@yandex.ru> To: David Karr , cygwin@cygwin.com Subject: Re: Another confusing error from someone else's Cygwin setup In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_THEBAT,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,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: Greetings, David Karr! > 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() { > --------------- Quick and dirty way to solve your issue - $ tr -d '\r' > script.fixed < script.erring > This was pretty perplexing, It is actually pretty clear, though. $ od -t x1a < script.erring See the output. -- With best regards, Andrey Repin Wednesday, July 5, 2023 22:22:57 Sorry for my terrible english...