delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/01/21:26:14

X-Spam-Check-By: sourceware.org
Date: Fri, 1 Dec 2006 21:25:58 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Gary R. Van Sickle" <g DOT r DOT vansickle AT worldnet DOT att DOT net>
cc: cygwin AT cygwin DOT com
Subject: RE: bash scripting problem
In-Reply-To: <003401c715b6$a874da50$020aa8c0@DFW5RB41>
Message-ID: <Pine.GSO.4.63.0612012124250.5620@access1.cims.nyu.edu>
References: <003401c715b6$a874da50$020aa8c0 AT DFW5RB41>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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 Fri, 1 Dec 2006, Gary R. Van Sickle wrote:

> > From: Rob Walker
> > Sent: Friday, December 01, 2006 5:29 PM
> > Subject: Re: bash scripting problem
> >
> > Eric Blake wrote:
> > > According to Andrew Louie on 12/1/2006 3:17 PM:
> > >
> > >>> You have DOS line endings in these files.  Use 'd2u' to
> > remove them.
> > >>>
> > >>>
> > >> Thanks! I would have never known that,
> > >>
> > >> now, can i run d2u on every file in my installation?
> > >>
> > >
> > > No, only run it on text files (it corrupts binary files,
> > such as *.exe).
> > >
> > d2u may also corrupt "text" files that need to have CR in
> > them.  This includes bash scripts that need to parse or output CR.
> >
> > -Rob
>
> Do you have a link to such a script?  I don't mean a proof-of-principle;
> I'm sure a suitable example can be contrived.  What I'm looking for is a
> shell script "in the wild" that purposely has a carriage return embedded
> in it for reasons other than ending a line of the script.

I've written some CGI scripts like that early on (which needed to output
CRLF lines, but had LF line endings otherwise).  That was before I
discovered "echo -ne".
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

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