delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT 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 AT cygwin DOT com |
Subject: | Re: Bash shell script issue |
X-PHP-Originating-Script: | 0:rcube.php |
MIME-Version: | 1.0 |
Date: | Wed, 07 Sep 2016 14:12:12 -0400 |
From: | wilson <wilson AT ds DOT net> |
In-Reply-To: | <039bcc69d005bf6db5aba99a90f51e36@www.ds.net> |
References: | <330568691 DOT 2384551 DOT 1473201409220 DOT ref AT mail DOT yahoo DOT com> <330568691 DOT 2384551 DOT 1473201409220 AT mail DOT yahoo DOT com> <32e004cb44addbaefde0839df5500d60 AT www DOT ds DOT net> <039bcc69d005bf6db5aba99a90f51e36 AT www DOT ds DOT net> |
Message-ID: | <e9f9ac1e0d6ded5f61d3ea784026e396@www.ds.net> |
X-Sender: | wilson AT 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |