www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/07/08/18:19:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_05
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: identical scripts don't behave identically
Date: Wed, 8 Jul 2009 17:19:02 -0500
Message-ID: <786EBDA1AC46254B813E200779E7AD361E69CB@srv1163ex1.flightsafety.com>
In-Reply-To: <24400289.post@talk.nabble.com>
References: <24400289 DOT post AT talk DOT nabble DOT com>
From: "Thrall, Bryan" <bryan DOT thrall AT flightsafety DOT com>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
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

roc97007 wrote on Wednesday, July 08, 2009 5:11 PM:
> To summarize, as far as I can tell the files are identical, but one
works
> and the other can't seem to find the current directory.  If, in the
broken
> script, I substitute any command that needs to read or write to or
from the
> file system, it will always fail with "file not found" or "no such
file or
> directory".  The other script with the exact same commands (assuming
they
> are legal and reasonable) will always work.
>=20
> Obviously there is a difference between the files.  I can't figure out
what
> it is.  The issue is demonstrably a characteristic of the file,
because if I
> delete or rename aaa.sh and then "cp aab.sh aaa.sh", then they will
both
> work.
>=20
> This is driving me crazy.  We are under a deadline, and some scripts
work
> and some do not, seemingly randomly.  Our current work-around is to
copy a
> script that works to a different name and then replace the content.
This is
> a ridiculous workaround, and since we don't know what the mechanism is
we
> have no idea if it'll still work tomorrow or next week.
>=20
> Please help!

Perhaps one of the files has DOS line endings and the other has UNIX
line endings? Try d2u on the broken one to see if it fixes the problem.

--=20
Bryan Thrall
FlightSafety International
bryan DOT thrall AT flightsafety DOT com

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

- Raw text -


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