X-Recipient: archive-cygwin@delorie.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:to:subject:mime-version:content-type
	:content-transfer-encoding:date:from:in-reply-to:references
	:message-id; q=dns; s=default; b=aZbnky0bb6vo7yPMGP28U+qf04GHEmR
	i/hQvlJDWZGJwsUk7YgVSMeTaF0KVnxq2r0KWjzzkibnLxiZ/fCRi0W7oZSSn5d8
	YxJ0XukF4D56MURG9u1w8rPMkx5ANDsuOnGyy2qtXtm+/WJXgfAum4QAycimeMei
	jvIZFU1YvrWg=
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:to:subject:mime-version:content-type
	:content-transfer-encoding:date:from:in-reply-to:references
	:message-id; s=default; bh=4AK28wvmfyNStuf7lHKZHCqP9+k=; b=tx9q9
	Vad4vZveR2J4RQ7oC3tkPgr+ap1uSRQ6KP8KXqkgRW8I3sgGW7wQ16UfD46AZH62
	BEpDXMZlDJPlsUB9TtK3IkDkky3hl0ZTkzQ+FF8UbNN7d1GiYp1m0DmoVz6EaocY
	EtoT8ZA66JkuEN+p538ham4j+1zbc28/YeC5BI=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:www, H*M:www
X-HELO: s1.ds.net
To: cygwin@cygwin.com
Subject: Re: Bash shell script issue
X-PHP-Originating-Script: 0:rcube.php
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Content-Transfer-Encoding: 7bit
Date: Wed, 07 Sep 2016 14:12:12 -0400
From: wilson <wilson@ds.net>
In-Reply-To: <039bcc69d005bf6db5aba99a90f51e36@www.ds.net>
References: <330568691.2384551.1473201409220.ref@mail.yahoo.com> <330568691.2384551.1473201409220@mail.yahoo.com> <32e004cb44addbaefde0839df5500d60@www.ds.net> <039bcc69d005bf6db5aba99a90f51e36@www.ds.net>
Message-ID: <e9f9ac1e0d6ded5f61d3ea784026e396@www.ds.net>
X-Sender: wilson@localhost
User-Agent: Roundcube Webmail/1.0.2
X-IsSubscribed: yes


> On 2016-09-06 18:36, Kipton Moravec wrote: I am relatively new to shell 
> scripts, but this works on linux and I do not know why it does not work 
> for me in cygwin. ... What am I doing wrong or is this an error? Where 
> do the carriage returns (^M) come from, and how do I get rid of them?

The (^M -Control M) characters are displayed because Windows is stupid 
and didn't do the sensible thing for End Of Line for plain text files. 
Linux/Unix uses a Carriage Return (CR) followed by a Line Feed (LF) to 
do an EOL. A Google search for "Control M Character" will bring up a lot 
of web sites dealing with explaining this.

  You need to run "dos2unix" or "unix2dos" on your script to convert the 
EOL to the proper OS formatting when transferring between real 
Linux/Unix machines and Windows machines. These utilities are available 
in the Cygwin utilities download (look for it), but I'm not sure they 
are included in the basic default packages.

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

