delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/02/16:37:15

X-Spam-Check-By: sourceware.org
Date: Mon, 2 Oct 2006 13:36:29 -0700 (PDT)
From: "Peter A. Castro" <doctor AT fruitbat DOT org>
To: Eric Blake <ebb9 AT byu DOT net>
cc: Cygwin List <cygwin AT cygwin DOT com>, thomas DOT porschberg AT osp-dd DOT de
Subject: Re: sqlplus and end-of-line problem in shell script code
In-Reply-To: <452104BE.2030100@byu.net>
Message-ID: <Pine.LNX.4.63.0610021325090.2621@gremlin.fruitbat.org>
References: <20060929102628 DOT 49430820 AT porschberg DOT osp-dd DOT de> <efjcsl$iii$1 AT sea DOT gmane DOT org> <20060929180634 DOT 53341dd9 AT porschberg DOT osp-dd DOT de> <Pine DOT LNX DOT 4 DOT 63 DOT 0609291001160 DOT 2621 AT gremlin DOT fruitbat DOT org> <20061002132729 DOT 30e37e47 AT porschberg DOT osp-dd DOT de> <452104BE DOT 2030100 AT byu DOT net>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Mon, 2 Oct 2006, Eric Blake wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ugh - top-posting reformatted and irrelevant context trimmed to avoid
> http://cygwin.com/acronyms/#TOFU.
>
>> Am Fri, 29 Sep 2006 10:09:45 -0700 (PDT)
>> schrieb "Peter A. Castro" <doctor AT fruitbat DOT org>:
>                                   ^^^^        ^^^^^

Well, I get so much spam anyways, I guess a bit more won't matter :)

> UGH - raw email addresses munged, to avoid spamming others.
> http://cygwin.com/acronyms/#PCYMTNQREAIYR
>
>>> On Fri, 29 Sep 2006, Thomas Porschberg wrote:
>>>
>>> Check your mounts.  See if you have /tmp mounted in textmode.
>>> Also, check if the filesystem you are running the script from is
>>> mounted in textmode or not and weither the CYGWIN env var has
>>> textmode on binmode set.  Try playing around with textmode &
>>> binmode.  Read the cygwin doc concerning text translation:
>>
>> I think I found the problem.
>> A college of me did not update its cygwin packages for a long time.
>> And my script was working at his cygwin environment.
>> Then he updated to the recent packages and to the recent bash.
>> And my script did not work any longer !
>
> I would need more details on your setup of why you think the blame is on
> bash, although if you did upgrade to bash-3.1-8, you should read the
> various other threads from this week on my intentional change to no longer
> support \r\n line endings in bash scripts residing on binary mount points
> in the interest of speed.

As I said before, check your mounts.

This change in behaviour of BASH may just be exposing the underlying
problem I'm guessing that his files are on a binary mount but contain
CRLF.

As a test, Thomas, change your script to use a different shell (like, for
example, /bin/zsh) which chomps on the crlf's internally and spits out
only lf's.

Another alternative would be to create a textmode mount point, copy your
scipts there and run them from there.

Another alternative is to push your scripts through a filter (there's
lots of ways to do this) to remove the crlfs and write them to a binary
mounted filesystem.

> - --
> Life is short - so eat dessert first!
>
> Eric Blake             ebb9 AT byu DOT net
> volunteer cygwin bash maintainer
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.1 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFIQS984KuGfSFAYARApI6AJ0USKOfcZFaTGkJ6ghXCdo2Vd26GwCgn5lT
> a8tjx7120wXpN5BYWuzB4lM=
> =Ow30
> -----END PGP SIGNATURE-----
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>

-- 
Peter A. Castro <doctor AT fruitbat DOT org> or <Peter DOT Castro AT oracle DOT com>
 	"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019