delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/11/06/12:32:17

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C27B5385ED6F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1699291926;
bh=1/5RcTgxrUxcObaSbjDNegTpckxKTGQ4yf4lr4wP/0w=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=LaA46oNVbTkh+APDY4cnlGp3u82/F4afdz7mycpq6NsEZ8CzTC0DYu0OyeK76PdcF
PZjYStZb5KzIsv/3Y7DrqZfTIr74sOpbnZQc43dkZXxxSp0AjV5J3OBx/6GsShgwpt
upEahagx3IX6jpaKaXsYJWpKdEiwSMdl44Qo1ZUU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A555C3858C78
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A555C3858C78
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
X-Yandex-Fwd: 1
Date: Wed, 5 Jul 2023 22:25:23 +0300
X-Mailer: The Bat! (v9.3.4) Professional
Message-ID: <1417059262.20230705222523@yandex.ru>
To: David Karr <davidmichaelkarr AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: Another confusing error from someone else's Cygwin setup
In-Reply-To: <CAA5t8VrR9yD3LS8AyRWD9O5J6gDbrfdbaWSUrjzwjYu30Umkiw@mail.gmail.com>
References: <CAA5t8VrR9yD3LS8AyRWD9O5J6gDbrfdbaWSUrjzwjYu30Umkiw AT mail DOT gmail DOT com>
MIME-Version: 1.0
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
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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: Andrey Repin via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Andrey Repin <anrdaemon AT yandex DOT ru>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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...


-- 
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